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;
@@ -0,0 +1,41 @@
--
-- Table structure for table `achievement_category`
--
DROP TABLE IF EXISTS `achievement_category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `achievement_category` (
`Name` text,
`ID` int(10) unsigned NOT NULL DEFAULT '0',
`Parent` smallint(6) NOT NULL DEFAULT '0',
`UiOrder` tinyint(4) 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 `achievement_category_locale`
--
DROP TABLE IF EXISTS `achievement_category_locale`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `achievement_category_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 */;