aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2023-11-15 17:15:21 +0100
committerOvahlord <dreadkiller@gmx.de>2023-11-15 17:59:53 +0100
commitc562d0c13a0508437b815594763a07e8a848d7b1 (patch)
treebf6f3b8aee0978c9738e3f5114f90cb22f11e5f9 /src
parent4b63440bdb0b7e6f3ab2270aa08e5d6b3a2599ba (diff)
Core/DataStores: load TalentTab.db2
Diffstat (limited to 'src')
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.cpp6
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.h4
-rw-r--r--src/server/game/DataStores/DB2LoadInfo.h17
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp2
-rw-r--r--src/server/game/DataStores/DB2Structure.h12
5 files changed, 41 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp
index 422ede2bf7a..389015f59ae 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp
@@ -1619,6 +1619,12 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PREPARE_MAX_ID_STMT(HOTFIX_SEL_TALENT, "SELECT MAX(ID) + 1 FROM talent", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_TALENT, "SELECT ID, Description_lang FROM talent_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
+ // TalentTab.db2
+ PrepareStatement(HOTFIX_SEL_TALENT_TAB, "SELECT ID, Name, BackgroundFile, OrderIndex, RaceMask, ClassMask, PetTalentMask, SpellIconID"
+ " FROM talent_tab WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
+ PREPARE_MAX_ID_STMT(HOTFIX_SEL_TALENT_TAB, "SELECT MAX(ID) + 1 FROM talent_tab", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_TALENT_TAB, "SELECT ID, Name_lang FROM talent_tab_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
+
// TaxiNodes.db2
PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT Name, PosX, PosY, PosZ, MapOffsetX, MapOffsetY, FlightMapOffsetX, FlightMapOffsetY, ID, "
"ContinentID, ConditionID, CharacterBitNumber, Flags, UiTextureKitID, Facing, SpecialIconConditionID, VisibilityConditionID, "
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h
index 524216c81e8..0496323703e 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.h
+++ b/src/server/database/Database/Implementation/HotfixDatabase.h
@@ -932,6 +932,10 @@ enum HotfixDatabaseStatements : uint32
HOTFIX_SEL_TALENT_MAX_ID,
HOTFIX_SEL_TALENT_LOCALE,
+ HOTFIX_SEL_TALENT_TAB,
+ HOTFIX_SEL_TALENT_TAB_MAX_ID,
+ HOTFIX_SEL_TALENT_TAB_LOCALE,
+
HOTFIX_SEL_TAXI_NODES,
HOTFIX_SEL_TAXI_NODES_MAX_ID,
HOTFIX_SEL_TAXI_NODES_LOCALE,
diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h
index 5ebf434a6d3..74a9d0a298c 100644
--- a/src/server/game/DataStores/DB2LoadInfo.h
+++ b/src/server/game/DataStores/DB2LoadInfo.h
@@ -5384,6 +5384,23 @@ struct TalentLoadInfo
static constexpr DB2LoadInfo Instance{ Fields, 28, &TalentMeta::Instance, HOTFIX_SEL_TALENT };
};
+struct TalentTabLoadInfo
+{
+ static constexpr DB2FieldMeta Fields[8] =
+ {
+ { false, FT_INT, "ID" },
+ { false, FT_STRING, "Name" },
+ { false, FT_STRING_NOT_LOCALIZED, "BackgroundFile" },
+ { true, FT_INT, "OrderIndex" },
+ { true, FT_INT, "RaceMask" },
+ { true, FT_INT, "ClassMask" },
+ { true, FT_INT, "PetTalentMask" },
+ { true, FT_INT, "SpellIconID" },
+ };
+
+ static constexpr DB2LoadInfo Instance{ Fields, 8, &TalentTabMeta::Instance, HOTFIX_SEL_TALENT_TAB };
+};
+
struct TaxiNodesLoadInfo
{
static constexpr DB2FieldMeta Fields[19] =
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index a531364076c..fb11be6e8ea 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -313,6 +313,7 @@ DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore("SpellXS
DB2Storage<SummonPropertiesEntry> sSummonPropertiesStore("SummonProperties.db2", &SummonPropertiesLoadInfo::Instance);
DB2Storage<TactKeyEntry> sTactKeyStore("TactKey.db2", &TactKeyLoadInfo::Instance);
DB2Storage<TalentEntry> sTalentStore("Talent.db2", &TalentLoadInfo::Instance);
+DB2Storage<TalentTabEntry> sTalentTabStore("TalentTab.db2", &TalentTabLoadInfo::Instance);
DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", &TaxiNodesLoadInfo::Instance);
DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", &TaxiPathLoadInfo::Instance);
DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", &TaxiPathNodeLoadInfo::Instance);
@@ -890,6 +891,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
LOAD_DB2(sSummonPropertiesStore);
LOAD_DB2(sTactKeyStore);
LOAD_DB2(sTalentStore);
+ LOAD_DB2(sTalentTabStore);
LOAD_DB2(sTaxiNodesStore);
LOAD_DB2(sTaxiPathStore);
LOAD_DB2(sTaxiPathNodeStore);
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 1de4537a3ed..1b8c798039a 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -3809,6 +3809,18 @@ struct TalentEntry
std::array<int32, 3> PrereqRank;
};
+struct TalentTabEntry
+{
+ uint32 ID;
+ LocalizedString Name;
+ char const* BackgroundFile;
+ int32 OrderIndex;
+ int32 RaceMask;
+ int32 ClassMask;
+ int32 PetTalentMask;
+ int32 SpellIconID;
+};
+
struct TaxiNodesEntry
{
LocalizedString Name;