diff options
| author | Ovahlord <dreadkiller@gmx.de> | 2023-11-27 22:04:39 +0100 |
|---|---|---|
| committer | Ovahlord <dreadkiller@gmx.de> | 2023-11-27 22:04:39 +0100 |
| commit | bbb320f39013bb540d69a36fe7be72c1ac6ba9d3 (patch) | |
| tree | 1c52714724cc6009fefe363c248fd9d11a05980c /src/server/game | |
| parent | cb5f57a8b39c3c6250b487990a414b55f2a44eab (diff) | |
Core/DataStores: load ItemRandomProperties.db2 and ItemRandomSuffix.db2
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 37 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 2 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 15 |
4 files changed, 56 insertions, 0 deletions
diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 6cb7a4124e2..5df14becfee 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -2917,6 +2917,43 @@ struct ItemPriceBaseLoadInfo static constexpr DB2LoadInfo Instance{ Fields, 4, &ItemPriceBaseMeta::Instance, HOTFIX_SEL_ITEM_PRICE_BASE }; }; +struct ItemRandomPropertiesLoadInfo +{ + static constexpr DB2FieldMeta Fields[7] = + { + { false, FT_INT, "ID" }, + { false, FT_STRING, "Name" }, + { false, FT_SHORT, "Enchantment1" }, + { false, FT_SHORT, "Enchantment2" }, + { false, FT_SHORT, "Enchantment3" }, + { false, FT_SHORT, "Enchantment4" }, + { false, FT_SHORT, "Enchantment5" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 7, &ItemRandomPropertiesMeta::Instance, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES }; +}; + +struct ItemRandomSuffixLoadInfo +{ + static constexpr DB2FieldMeta Fields[12] = + { + { false, FT_INT, "ID" }, + { false, FT_STRING, "Name" }, + { false, FT_SHORT, "Enchantment1" }, + { false, FT_SHORT, "Enchantment2" }, + { false, FT_SHORT, "Enchantment3" }, + { false, FT_SHORT, "Enchantment4" }, + { false, FT_SHORT, "Enchantment5" }, + { false, FT_SHORT, "AllocationPct1" }, + { false, FT_SHORT, "AllocationPct2" }, + { false, FT_SHORT, "AllocationPct3" }, + { false, FT_SHORT, "AllocationPct4" }, + { false, FT_SHORT, "AllocationPct5" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 12, &ItemRandomSuffixMeta::Instance, HOTFIX_SEL_ITEM_RANDOM_SUFFIX }; +}; + struct ItemSearchNameLoadInfo { static constexpr DB2FieldMeta Fields[17] = diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 6fbd316f650..6b50a5cfc07 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -195,6 +195,8 @@ DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("It DB2Storage<ItemModifiedAppearanceExtraEntry> sItemModifiedAppearanceExtraStore("ItemModifiedAppearanceExtra.db2", &ItemModifiedAppearanceExtraLoadInfo::Instance); DB2Storage<ItemNameDescriptionEntry> sItemNameDescriptionStore("ItemNameDescription.db2", &ItemNameDescriptionLoadInfo::Instance); DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", &ItemPriceBaseLoadInfo::Instance); +DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore("ItemRandomProperties.db2", &ItemRandomPropertiesLoadInfo::Instance); +DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore("ItemRandomSuffix.db2", &ItemRandomSuffixLoadInfo::Instance); DB2Storage<ItemSearchNameEntry> sItemSearchNameStore("ItemSearchName.db2", &ItemSearchNameLoadInfo::Instance); DB2Storage<ItemSetEntry> sItemSetStore("ItemSet.db2", &ItemSetLoadInfo::Instance); DB2Storage<ItemSetSpellEntry> sItemSetSpellStore("ItemSetSpell.db2", &ItemSetSpellLoadInfo::Instance); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 0374d9228e6..1bcc2e6c4d4 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -159,6 +159,8 @@ TC_GAME_API extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCa TC_GAME_API extern DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore; TC_GAME_API extern DB2Storage<ItemModifiedAppearanceExtraEntry> sItemModifiedAppearanceExtraStore; TC_GAME_API extern DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore; +TC_GAME_API extern DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore; +TC_GAME_API extern DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore; TC_GAME_API extern DB2Storage<ItemSearchNameEntry> sItemSearchNameStore; TC_GAME_API extern DB2Storage<ItemSetEntry> sItemSetStore; TC_GAME_API extern DB2Storage<ItemSetSpellEntry> sItemSetSpellStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index d020b457199..4024dc833bf 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -2240,6 +2240,21 @@ struct ItemPriceBaseEntry float Weapon; }; +struct ItemRandomPropertiesEntry +{ + uint32 ID; + LocalizedString Name; + std::array<uint16, 5> Enchantment; +}; + +struct ItemRandomSuffixEntry +{ + uint32 ID; + LocalizedString Name; + std::array<uint16, 5> Enchantment; + std::array<uint16, 5> AllocationPct; +}; + struct ItemSearchNameEntry { Trinity::RaceMask<int64> AllowableRace; |
