mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DataStores: Load LanguageWords.db2 and Languages.db2 for future use
This commit is contained in:
54
sql/updates/hotfixes/master/2021_04_29_00_hotfixes.sql
Normal file
54
sql/updates/hotfixes/master/2021_04_29_00_hotfixes.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
--
|
||||
-- Table structure for table `language_words`
|
||||
--
|
||||
DROP TABLE IF EXISTS `language_words`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `language_words` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Word` text,
|
||||
`LanguageID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `languages`
|
||||
--
|
||||
DROP TABLE IF EXISTS `languages`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `languages` (
|
||||
`Name` text,
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `languages_locale`
|
||||
--
|
||||
DROP TABLE IF EXISTS `languages_locale`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `languages_locale` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`Name_lang` text,
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
/*!50500 PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -910,6 +910,15 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_KEYCHAIN, "SELECT MAX(ID) + 1 FROM keychain", CONNECTION_SYNCH);
|
||||
|
||||
// LanguageWords.db2
|
||||
PrepareStatement(HOTFIX_SEL_LANGUAGE_WORDS, "SELECT ID, Word, LanguageID FROM language_words WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_LANGUAGE_WORDS, "SELECT MAX(ID) + 1 FROM language_words", CONNECTION_SYNCH);
|
||||
|
||||
// Languages.db2
|
||||
PrepareStatement(HOTFIX_SEL_LANGUAGES, "SELECT Name, ID FROM languages WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_LANGUAGES, "SELECT MAX(ID) + 1 FROM languages", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_LANGUAGES, "SELECT ID, Name_lang FROM languages_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// LfgDungeons.db2
|
||||
PrepareStatement(HOTFIX_SEL_LFG_DUNGEONS, "SELECT ID, Name, Description, TypeID, Subtype, Faction, IconTextureFileID, RewardsBgTextureFileID, "
|
||||
"PopupBgTextureFileID, ExpansionLevel, MapID, DifficultyID, MinGear, GroupID, OrderIndex, RequiredPlayerConditionId, RandomID, ScenarioID, "
|
||||
|
||||
@@ -528,6 +528,13 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_KEYCHAIN,
|
||||
HOTFIX_SEL_KEYCHAIN_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_LANGUAGE_WORDS,
|
||||
HOTFIX_SEL_LANGUAGE_WORDS_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_LANGUAGES,
|
||||
HOTFIX_SEL_LANGUAGES_MAX_ID,
|
||||
HOTFIX_SEL_LANGUAGES_LOCALE,
|
||||
|
||||
HOTFIX_SEL_LFG_DUNGEONS,
|
||||
HOTFIX_SEL_LFG_DUNGEONS_MAX_ID,
|
||||
HOTFIX_SEL_LFG_DUNGEONS_LOCALE,
|
||||
|
||||
@@ -3398,6 +3398,35 @@ struct KeychainLoadInfo
|
||||
}
|
||||
};
|
||||
|
||||
struct LanguageWordsLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static DB2FieldMeta const fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_STRING_NOT_LOCALIZED, "Word" },
|
||||
{ false, FT_INT, "LanguageID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, LanguageWordsMeta::Instance(), HOTFIX_SEL_LANGUAGE_WORDS);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct LanguagesLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static DB2FieldMeta const fields[] =
|
||||
{
|
||||
{ false, FT_STRING, "Name" },
|
||||
{ false, FT_INT, "ID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, LanguagesMeta::Instance(), HOTFIX_SEL_LANGUAGES);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct LfgDungeonsLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
|
||||
@@ -193,6 +193,8 @@ DB2Storage<ItemSpecEntry> sItemSpecStore("ItemSpec.db2", I
|
||||
DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideLoadInfo::Instance());
|
||||
DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeLoadInfo::Instance());
|
||||
DB2Storage<KeychainEntry> sKeychainStore("Keychain.db2", KeychainLoadInfo::Instance());
|
||||
DB2Storage<LanguageWordsEntry> sLanguageWordsStore("LanguageWords.db2", LanguageWordsLoadInfo::Instance());
|
||||
DB2Storage<LanguagesEntry> sLanguagesStore("Languages.db2", LanguagesLoadInfo::Instance());
|
||||
DB2Storage<LFGDungeonsEntry> sLFGDungeonsStore("LFGDungeons.db2", LfgDungeonsLoadInfo::Instance());
|
||||
DB2Storage<LightEntry> sLightStore("Light.db2", LightLoadInfo::Instance());
|
||||
DB2Storage<LiquidTypeEntry> sLiquidTypeStore("LiquidType.db2", LiquidTypeLoadInfo::Instance());
|
||||
@@ -729,6 +731,8 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
LOAD_DB2(sItemSpecOverrideStore);
|
||||
LOAD_DB2(sItemXBonusTreeStore);
|
||||
LOAD_DB2(sKeychainStore);
|
||||
LOAD_DB2(sLanguageWordsStore);
|
||||
LOAD_DB2(sLanguagesStore);
|
||||
LOAD_DB2(sLFGDungeonsStore);
|
||||
LOAD_DB2(sLightStore);
|
||||
LOAD_DB2(sLiquidTypeStore);
|
||||
|
||||
@@ -147,6 +147,8 @@ TC_GAME_API extern DB2Storage<ItemSetSpellEntry> sItemSetSpel
|
||||
TC_GAME_API extern DB2Storage<ItemSparseEntry> sItemSparseStore;
|
||||
TC_GAME_API extern DB2Storage<ItemSpecEntry> sItemSpecStore;
|
||||
TC_GAME_API extern DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore;
|
||||
TC_GAME_API extern DB2Storage<LanguageWordsEntry> sLanguageWordsStore;
|
||||
TC_GAME_API extern DB2Storage<LanguagesEntry> sLanguagesStore;
|
||||
TC_GAME_API extern DB2Storage<LFGDungeonsEntry> sLFGDungeonsStore;
|
||||
TC_GAME_API extern DB2Storage<LiquidTypeEntry> sLiquidTypeStore;
|
||||
TC_GAME_API extern DB2Storage<LockEntry> sLockStore;
|
||||
|
||||
@@ -2110,6 +2110,19 @@ struct KeychainEntry
|
||||
uint8 Key[KEYCHAIN_SIZE];
|
||||
};
|
||||
|
||||
struct LanguageWordsEntry
|
||||
{
|
||||
uint32 ID;
|
||||
char const* Word;
|
||||
uint32 LanguageID;
|
||||
};
|
||||
|
||||
struct LanguagesEntry
|
||||
{
|
||||
LocalizedString Name;
|
||||
uint32 ID;
|
||||
};
|
||||
|
||||
struct LFGDungeonsEntry
|
||||
{
|
||||
uint32 ID;
|
||||
|
||||
Reference in New Issue
Block a user