diff options
-rw-r--r-- | sql/updates/hotfixes/master/2021_06_06_02_hotfixes.sql | 46 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 6 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.h | 4 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 21 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 1 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 13 |
7 files changed, 93 insertions, 0 deletions
diff --git a/sql/updates/hotfixes/master/2021_06_06_02_hotfixes.sql b/sql/updates/hotfixes/master/2021_06_06_02_hotfixes.sql new file mode 100644 index 00000000000..05e18ed4cce --- /dev/null +++ b/sql/updates/hotfixes/master/2021_06_06_02_hotfixes.sql @@ -0,0 +1,46 @@ +-- +-- Table structure for table `pvp_tier` +-- +DROP TABLE IF EXISTS `pvp_tier`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `pvp_tier` ( + `Name` text, + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinRating` smallint(6) NOT NULL DEFAULT '0', + `MaxRating` smallint(6) NOT NULL DEFAULT '0', + `PrevTier` int(11) NOT NULL DEFAULT '0', + `NextTier` int(11) NOT NULL DEFAULT '0', + `BracketID` tinyint(4) NOT NULL DEFAULT '0', + `Rank` tinyint(4) NOT NULL DEFAULT '0', + `RankIconFileDataID` int(11) 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 `pvp_tier_locale` +-- +DROP TABLE IF EXISTS `pvp_tier_locale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `pvp_tier_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 */; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 3a136952980..507f4f2f9d4 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -1134,6 +1134,12 @@ void HotfixDatabaseConnection::DoPrepareStatements() " FROM pvp_talent_slot_unlock WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK, "SELECT MAX(ID) + 1 FROM pvp_talent_slot_unlock", CONNECTION_SYNCH); + // PvpTier.db2 + PrepareStatement(HOTFIX_SEL_PVP_TIER, "SELECT Name, ID, MinRating, MaxRating, PrevTier, NextTier, BracketID, `Rank`, RankIconFileDataID" + " FROM pvp_tier WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TIER, "SELECT MAX(ID) + 1 FROM pvp_tier", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_PVP_TIER, "SELECT ID, Name_lang FROM pvp_tier_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); + // QuestFactionReward.db2 PrepareStatement(HOTFIX_SEL_QUEST_FACTION_REWARD, "SELECT ID, Difficulty1, Difficulty2, Difficulty3, Difficulty4, Difficulty5, Difficulty6, " "Difficulty7, Difficulty8, Difficulty9, Difficulty10 FROM quest_faction_reward WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 29f9ddb17a2..2535e79cef6 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -655,6 +655,10 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK, HOTFIX_SEL_PVP_TALENT_SLOT_UNLOCK_MAX_ID, + HOTFIX_SEL_PVP_TIER, + HOTFIX_SEL_PVP_TIER_MAX_ID, + HOTFIX_SEL_PVP_TIER_LOCALE, + HOTFIX_SEL_QUEST_FACTION_REWARD, HOTFIX_SEL_QUEST_FACTION_REWARD_MAX_ID, diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 6b0eefc7670..586979d5f76 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -4338,6 +4338,27 @@ struct PvpTalentSlotUnlockLoadInfo } }; +struct PvpTierLoadInfo +{ + static DB2LoadInfo const* Instance() + { + static DB2FieldMeta const fields[] = + { + { false, FT_STRING, "Name" }, + { false, FT_INT, "ID" }, + { true, FT_SHORT, "MinRating" }, + { true, FT_SHORT, "MaxRating" }, + { true, FT_INT, "PrevTier" }, + { true, FT_INT, "NextTier" }, + { true, FT_BYTE, "BracketID" }, + { true, FT_BYTE, "Rank" }, + { true, FT_INT, "RankIconFileDataID" }, + }; + static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, PvpTierMeta::Instance(), HOTFIX_SEL_PVP_TIER); + return &loadInfo; + } +}; + struct QuestFactionRewardLoadInfo { static DB2LoadInfo const* Instance() diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 45c10fd399b..872762d0900 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -231,6 +231,7 @@ DB2Storage<PVPItemEntry> sPVPItemStore("PVPItem.db2", Pvp DB2Storage<PvpTalentEntry> sPvpTalentStore("PvpTalent.db2", PvpTalentLoadInfo::Instance()); DB2Storage<PvpTalentCategoryEntry> sPvpTalentCategoryStore("PvpTalentCategory.db2", PvpTalentCategoryLoadInfo::Instance()); DB2Storage<PvpTalentSlotUnlockEntry> sPvpTalentSlotUnlockStore("PvpTalentSlotUnlock.db2", PvpTalentSlotUnlockLoadInfo::Instance()); +DB2Storage<PvpTierEntry> sPvpTierStore("PvpTier.db2", PvpTierLoadInfo::Instance()); DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardLoadInfo::Instance()); DB2Storage<QuestInfoEntry> sQuestInfoStore("QuestInfo.db2", QuestInfoLoadInfo::Instance()); DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardLoadInfo::Instance()); @@ -777,6 +778,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul LOAD_DB2(sPvpTalentStore); LOAD_DB2(sPvpTalentCategoryStore); LOAD_DB2(sPvpTalentSlotUnlockStore); + LOAD_DB2(sPvpTierStore); LOAD_DB2(sQuestFactionRewardStore); LOAD_DB2(sQuestInfoStore); LOAD_DB2(sQuestMoneyRewardStore); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 8286f184902..08cb150e66e 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -170,6 +170,7 @@ TC_GAME_API extern DB2Storage<PowerDisplayEntry> sPowerDispla TC_GAME_API extern DB2Storage<PvpTalentEntry> sPvpTalentStore; TC_GAME_API extern DB2Storage<PvpTalentCategoryEntry> sPvpTalentCategoryStore; TC_GAME_API extern DB2Storage<PvpTalentSlotUnlockEntry> sPvpTalentSlotUnlockStore; +TC_GAME_API extern DB2Storage<PvpTierEntry> sPvpTierStore; TC_GAME_API extern DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore; TC_GAME_API extern DB2Storage<QuestInfoEntry> sQuestInfoStore; TC_GAME_API extern DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index c57bef34f19..50238fcdb69 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -2655,6 +2655,19 @@ struct PvpTalentSlotUnlockEntry int32 DemonHunterLevelRequired; }; +struct PvpTierEntry +{ + LocalizedString Name; + uint32 ID; + int16 MinRating; + int16 MaxRating; + int32 PrevTier; + int32 NextTier; + int8 BracketID; + int8 Rank; + int32 RankIconFileDataID; +}; + struct QuestFactionRewardEntry { uint32 ID; |