From 04632fa1c34e5daae0d467612fd4fd77d1fa21e7 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 15 Nov 2023 21:12:51 +0100 Subject: Core/DataStores: load GlyphSlot.db2 --- .../database/Database/Implementation/HotfixDatabase.cpp | 4 ++++ src/server/database/Database/Implementation/HotfixDatabase.h | 3 +++ src/server/game/DataStores/DB2LoadInfo.h | 12 ++++++++++++ src/server/game/DataStores/DB2Stores.cpp | 1 + src/server/game/DataStores/DB2Structure.h | 7 +++++++ 5 files changed, 27 insertions(+) (limited to 'src') diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 389015f59ae..9662753ccc6 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -707,6 +707,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_GLYPH_BINDABLE_SPELL, "SELECT ID, SpellID, GlyphPropertiesID FROM glyph_bindable_spell WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_GLYPH_BINDABLE_SPELL, "SELECT MAX(ID) + 1 FROM glyph_bindable_spell", CONNECTION_SYNCH); + // GlyphSlot.db2 + PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Tooltip, Type FROM glyph_slot WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PREPARE_MAX_ID_STMT(HOTFIX_SEL_GLYPH_SLOT, "SELECT MAX(ID) + 1 FROM glyph_slot", CONNECTION_SYNCH); + // GlyphProperties.db2 PrepareStatement(HOTFIX_SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, GlyphType, GlyphExclusiveCategoryID, SpellIconFileDataID, GlyphSlotFlags" " FROM glyph_properties WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 0496323703e..a81f7046a39 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -407,6 +407,9 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_GLYPH_BINDABLE_SPELL, HOTFIX_SEL_GLYPH_BINDABLE_SPELL_MAX_ID, + HOTFIX_SEL_GLYPH_SLOT, + HOTFIX_SEL_GLYPH_SLOT_MAX_ID, + HOTFIX_SEL_GLYPH_PROPERTIES, HOTFIX_SEL_GLYPH_PROPERTIES_MAX_ID, diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 74a9d0a298c..80c81958373 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -2173,6 +2173,18 @@ struct GlyphBindableSpellLoadInfo static constexpr DB2LoadInfo Instance{ Fields, 3, &GlyphBindableSpellMeta::Instance, HOTFIX_SEL_GLYPH_BINDABLE_SPELL }; }; +struct GlyphSlotLoadInfo +{ + static constexpr DB2FieldMeta Fields[3] = + { + { false, FT_INT, "ID" }, + { true, FT_INT, "Tooltip" }, + { false, FT_INT, "Type" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 3, &GlyphSlotMeta::Instance, HOTFIX_SEL_GLYPH_SLOT }; +}; + struct GlyphPropertiesLoadInfo { static constexpr DB2FieldMeta Fields[6] = diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index fb11be6e8ea..d47477319be 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -151,6 +151,7 @@ DB2Storage sGarrSiteLevelPlotInstStore("Gar DB2Storage sGarrTalentTreeStore("GarrTalentTree.db2", &GarrTalentTreeLoadInfo::Instance); DB2Storage sGemPropertiesStore("GemProperties.db2", &GemPropertiesLoadInfo::Instance); DB2Storage sGlyphBindableSpellStore("GlyphBindableSpell.db2", &GlyphBindableSpellLoadInfo::Instance); +DB2Storage sGlyphSlotStore("GlyphSlot.db2", &GlyphSlotLoadInfo::Instance); DB2Storage sGlyphPropertiesStore("GlyphProperties.db2", &GlyphPropertiesLoadInfo::Instance); DB2Storage sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", &GlyphRequiredSpecLoadInfo::Instance); DB2Storage sGossipNPCOptionStore("GossipNPCOption.db2", &GossipNpcOptionLoadInfo::Instance); diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 1b8c798039a..1af31d98744 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -1833,6 +1833,13 @@ struct GlyphBindableSpellEntry uint32 GlyphPropertiesID; }; +struct GlyphSlotEntry +{ + uint32 ID; + int32 Tooltip; + uint32 Type; +}; + struct GlyphPropertiesEntry { uint32 ID; -- cgit v1.2.3