Core/DataStores: Load Achievement_Category.db2

Port From (https://github.com/TrinityCore/TrinityCore/commit/ad683a356a173f47fd9cd1f9860d5ea5d6da868c)
This commit is contained in:
hondacrx
2021-06-04 14:15:53 -04:00
parent cd9aab7d52
commit 32f4bf4c25
5 changed files with 66 additions and 8 deletions
@@ -45,14 +45,14 @@ namespace Framework.Constants
public enum CriteriaTreeOperator
{
Single = 0,
SinglerNotCompleted = 1,
All = 4,
SumChildren = 5,
MaxChild = 6,
CountDirectChildren = 7,
Any = 8,
SumChildrenWeight = 9
Complete = 0, // Complete
NotComplete = 1, // Not Complete
CompleteAll = 4, // Complete All
Sum = 5, // Sum Of Criteria Is
Highest = 6, // Highest Criteria Is
StartedAtLeast = 7, // Started At Least
CompleteAtLeast = 8, // Complete At Least
ProgressBar = 9 // Progress Bar
}
[Flags]
@@ -26,6 +26,10 @@ namespace Framework.Database
"Points, Flags, UiOrder, IconFileID, RewardItemID, CriteriaTree, SharesCriteria, CovenantID FROM achievement");
PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT_LOCALE, "SELECT ID, Description_lang, Title_lang, Reward_lang FROM achievement_locale WHERE locale = ?");
// AchievementCategory.db2
PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT_CATEGORY, "SELECT Name, ID, Parent, UiOrder FROM achievement_category");
PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT_CATEGORY_LOCALE, "SELECT ID, Name_lang FROM achievement_category_locale WHERE locale = ?");
// AdventureJournal.db2
PrepareStatement(HotfixStatements.SEL_ADVENTURE_JOURNAL, "SELECT ID, Name, Description, ButtonText, RewardDescription, ContinueDescription, Type, " +
"PlayerConditionID, Flags, ButtonActionType, TextureFileDataID, LfgDungeonID, QuestID, BattleMasterListID, PriorityMin, PriorityMax, ItemID, " +
@@ -1168,6 +1172,9 @@ namespace Framework.Database
SEL_ACHIEVEMENT,
SEL_ACHIEVEMENT_LOCALE,
SEL_ACHIEVEMENT_CATEGORY,
SEL_ACHIEVEMENT_CATEGORY_LOCALE,
SEL_ADVENTURE_JOURNAL,
SEL_ADVENTURE_JOURNAL_LOCALE,
+2
View File
@@ -51,6 +51,7 @@ namespace Game.DataStorage
}
AchievementStorage = ReadDB2<AchievementRecord>("Achievement.db2", HotfixStatements.SEL_ACHIEVEMENT, HotfixStatements.SEL_ACHIEVEMENT_LOCALE);
AchievementCategoryStorage = ReadDB2<AchievementCategoryRecord>("Achievement_Category.db2", HotfixStatements.SEL_ACHIEVEMENT_CATEGORY, HotfixStatements.SEL_ACHIEVEMENT_CATEGORY_LOCALE);
AdventureJournalStorage = ReadDB2<AdventureJournalRecord>("AdventureJournal.db2", HotfixStatements.SEL_ADVENTURE_JOURNAL, HotfixStatements.SEL_ADVENTURE_JOURNAL_LOCALE);
AdventureMapPOIStorage = ReadDB2<AdventureMapPOIRecord>("AdventureMapPOI.db2", HotfixStatements.SEL_ADVENTURE_MAP_POI, HotfixStatements.SEL_ADVENTURE_MAP_POI_LOCALE);
AnimationDataStorage = ReadDB2<AnimationDataRecord>("AnimationData.db2", HotfixStatements.SEL_ANIMATION_DATA);
@@ -414,6 +415,7 @@ namespace Game.DataStorage
#region Main Collections
public static DB6Storage<AchievementRecord> AchievementStorage;
public static DB6Storage<AchievementCategoryRecord> AchievementCategoryStorage;
public static DB6Storage<AdventureJournalRecord> AdventureJournalStorage;
public static DB6Storage<AdventureMapPOIRecord> AdventureMapPOIStorage;
public static DB6Storage<AnimationDataRecord> AnimationDataStorage;
@@ -42,6 +42,14 @@ namespace Game.DataStorage
public int CovenantID;
}
public sealed class AchievementCategoryRecord
{
public LocalizedString Name;
public uint Id;
public short Parent;
public sbyte UiOrder;
}
public sealed class AdventureJournalRecord
{
public uint Id;