diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-03-26 20:09:40 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-03-26 20:09:40 +0100 |
commit | 0969e93d151533fa8a74bb88b04ab8ee7c4602d9 (patch) | |
tree | 646fa8391ccb1fb8449621dfd6009c1381033750 /src | |
parent | f2a9da7b4961bae6d8130301ab1d79fd28c75cb2 (diff) |
Core/DataStore: Load ItemNameDescription
Diffstat (limited to 'src')
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 4 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.h | 3 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 15 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 1 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 7 |
6 files changed, 32 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 050b55db772..fbc14556cf5 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -601,6 +601,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, ItemAppearanceModifierID, ItemAppearanceID, OrderIndex, " "TransmogSourceTypeEnum FROM item_modified_appearance ORDER BY ID DESC", CONNECTION_SYNCH); + // ItemNameDescription.db2 + PrepareStatement(HOTFIX_SEL_ITEM_NAME_DESCRIPTION, "SELECT ID, Description, Color FROM item_name_description ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_NAME_DESCRIPTION, "SELECT ID, Description_lang FROM item_name_description_locale WHERE locale = ?", CONNECTION_SYNCH); + // ItemPriceBase.db2 PrepareStatement(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT ID, ItemLevel, Armor, Weapon FROM item_price_base ORDER BY ID DESC", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index d393c669f04..de9a7b7f330 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -326,6 +326,9 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, + HOTFIX_SEL_ITEM_NAME_DESCRIPTION, + HOTFIX_SEL_ITEM_NAME_DESCRIPTION_LOCALE, + HOTFIX_SEL_ITEM_PRICE_BASE, HOTFIX_SEL_ITEM_SEARCH_NAME, diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 9601989e718..f14772bf9ab 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -2848,6 +2848,21 @@ struct ItemModifiedAppearanceLoadInfo } }; +struct ItemNameDescriptionLoadInfo +{ + static DB2LoadInfo const* Instance() + { + static DB2FieldMeta const fields[] = + { + { false, FT_INT, "ID" }, + { false, FT_STRING, "Description" }, + { true, FT_INT, "Color" }, + }; + static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, ItemNameDescriptionMeta::Instance(), HOTFIX_SEL_ITEM_NAME_DESCRIPTION); + return &loadInfo; + } +}; + struct ItemPriceBaseLoadInfo { static DB2LoadInfo const* Instance() diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index f1aeebd006a..17f8111abe5 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -168,6 +168,7 @@ DB2Storage<ItemLevelSelectorQualitySetEntry> sItemLevelSelectorQualitySetStor DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryLoadInfo::Instance()); DB2Storage<ItemLimitCategoryConditionEntry> sItemLimitCategoryConditionStore("ItemLimitCategoryCondition.db2", ItemLimitCategoryConditionLoadInfo::Instance()); DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceLoadInfo::Instance()); +DB2Storage<ItemNameDescriptionEntry> sItemNameDescriptionStore("ItemNameDescription.db2", ItemNameDescriptionLoadInfo::Instance()); DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseLoadInfo::Instance()); DB2Storage<ItemSearchNameEntry> sItemSearchNameStore("ItemSearchName.db2", ItemSearchNameLoadInfo::Instance()); DB2Storage<ItemSetEntry> sItemSetStore("ItemSet.db2", ItemSetLoadInfo::Instance()); @@ -659,6 +660,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sItemLimitCategoryStore); LOAD_DB2(sItemLimitCategoryConditionStore); LOAD_DB2(sItemModifiedAppearanceStore); + LOAD_DB2(sItemNameDescriptionStore); LOAD_DB2(sItemPriceBaseStore); LOAD_DB2(sItemSearchNameStore); LOAD_DB2(sItemSetStore); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 9b02a371bae..a8c3b074336 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -128,6 +128,7 @@ TC_GAME_API extern DB2Storage<ItemDamageTwoHandEntry> sItemDamageT TC_GAME_API extern DB2Storage<ItemDamageTwoHandCasterEntry> sItemDamageTwoHandCasterStore; TC_GAME_API extern DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore; TC_GAME_API extern DB2Storage<ItemEffectEntry> sItemEffectStore; +TC_GAME_API extern DB2Storage<ItemNameDescriptionEntry> sItemNameDescriptionStore; TC_GAME_API extern DB2Storage<ItemEntry> sItemStore; TC_GAME_API extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; TC_GAME_API extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index f1bd08f93c0..ad80e089dae 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -1754,6 +1754,13 @@ struct ItemModifiedAppearanceEntry int8 TransmogSourceTypeEnum; }; +struct ItemNameDescriptionEntry +{ + uint32 ID; + LocalizedString* Description; + int32 Color; +}; + struct ItemPriceBaseEntry { uint32 ID; |