Core/DataStores: Load PvpTier.db2

Port From (https://github.com/TrinityCore/TrinityCore/commit/8d5356cdeaeaae7dc20bfca71ca24b8134a8e80c)
This commit is contained in:
hondacrx
2021-06-07 10:57:57 -04:00
parent 35d8cf8b9f
commit db0d46c9d1
4 changed files with 68 additions and 0 deletions
@@ -836,6 +836,10 @@ namespace Framework.Database
PrepareStatement(HotfixStatements.SEL_PVP_TALENT_SLOT_UNLOCK, "SELECT ID, Slot, LevelRequired, DeathKnightLevelRequired, DemonHunterLevelRequired" +
" FROM pvp_talent_slot_unlock");
// PvpTier.db2
PrepareStatement(HotfixStatements.SEL_PVP_TIER, "SELECT Name, ID, MinRating, MaxRating, PrevTier, NextTier, BracketID, `Rank`, RankIconFileDataID FROM pvp_tier");
PrepareStatement(HotfixStatements.SEL_PVP_TIER_LOCALE, "SELECT ID, Name_lang FROM pvp_tier_locale WHERE locale = ?");
// QuestFactionReward.db2
PrepareStatement(HotfixStatements.SEL_QUEST_FACTION_REWARD, "SELECT ID, Difficulty1, Difficulty2, Difficulty3, Difficulty4, Difficulty5, Difficulty6, " +
"Difficulty7, Difficulty8, Difficulty9, Difficulty10 FROM quest_faction_reward");
@@ -1624,6 +1628,9 @@ namespace Framework.Database
SEL_PVP_TALENT_SLOT_UNLOCK,
SEL_PVP_TIER,
SEL_PVP_TIER_LOCALE,
SEL_QUEST_FACTION_REWARD,
SEL_QUEST_INFO,
+2
View File
@@ -240,6 +240,7 @@ namespace Game.DataStorage
PvpTalentStorage = ReadDB2<PvpTalentRecord>("PvpTalent.db2", HotfixStatements.SEL_PVP_TALENT, HotfixStatements.SEL_PVP_TALENT_LOCALE);
PvpTalentCategoryStorage = ReadDB2<PvpTalentCategoryRecord>("PvpTalentCategory.db2", HotfixStatements.SEL_PVP_TALENT_CATEGORY);
PvpTalentSlotUnlockStorage = ReadDB2<PvpTalentSlotUnlockRecord>("PvpTalentSlotUnlock.db2", HotfixStatements.SEL_PVP_TALENT_SLOT_UNLOCK);
PvpTierStorage = ReadDB2<PvpTierRecord>("PvpTier.db2", HotfixStatements.SEL_PVP_TIER, HotfixStatements.SEL_PVP_TIER_LOCALE);
QuestFactionRewardStorage = ReadDB2<QuestFactionRewardRecord>("QuestFactionReward.db2", HotfixStatements.SEL_QUEST_FACTION_REWARD);
QuestInfoStorage = ReadDB2<QuestInfoRecord>("QuestInfo.db2", HotfixStatements.SEL_QUEST_INFO, HotfixStatements.SEL_QUEST_INFO_LOCALE);
QuestLineXQuestStorage = ReadDB2<QuestLineXQuestRecord>("QuestLineXQuest.db2", HotfixStatements.SEL_QUEST_LINE_X_QUEST);
@@ -610,6 +611,7 @@ namespace Game.DataStorage
public static DB6Storage<PvpTalentRecord> PvpTalentStorage;
public static DB6Storage<PvpTalentCategoryRecord> PvpTalentCategoryStorage;
public static DB6Storage<PvpTalentSlotUnlockRecord> PvpTalentSlotUnlockStorage;
public static DB6Storage<PvpTierRecord> PvpTierStorage;
public static DB6Storage<QuestFactionRewardRecord> QuestFactionRewardStorage;
public static DB6Storage<QuestInfoRecord> QuestInfoStorage;
public static DB6Storage<QuestLineXQuestRecord> QuestLineXQuestStorage;
@@ -213,4 +213,17 @@ namespace Game.DataStorage
public uint DeathKnightLevelRequired;
public uint DemonHunterLevelRequired;
}
public sealed class PvpTierRecord
{
public LocalizedString Name;
public uint Id;
public short MinRating;
public short MaxRating;
public int PrevTier;
public int NextTier;
public sbyte BracketID;
public sbyte Rank;
public int RankIconFileDataID;
}
}