aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.cpp18
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.h8
-rw-r--r--src/server/game/DataStores/DB2LoadInfo.h37
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp2
-rw-r--r--src/server/game/DataStores/DB2Stores.h2
-rw-r--r--src/server/game/DataStores/DB2Structure.h15
6 files changed, 80 insertions, 2 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp
index c5f1b720b3d..5f12c0eb458 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp
@@ -722,8 +722,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GLYPH_REQUIRED_SPEC, "SELECT MAX(ID) + 1 FROM glyph_required_spec", CONNECTION_SYNCH);
// GossipNpcOption.db2
- PrepareStatement(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT ID, GossipNpcOption, LFGDungeonsID, Unk341_1, Unk341_2, Unk341_3, Unk341_4, Unk341_5, Unk341_6, "
- "Unk341_7, Unk341_8, Unk341_9, GossipOptionID FROM gossip_npc_option WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
+ PrepareStatement(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT ID, GossipNpcOption, LFGDungeonsID, Unk341_1, Unk341_2, Unk341_3, Unk341_4, Unk341_5, "
+ "Unk341_6, Unk341_7, Unk341_8, Unk341_9, GossipOptionID FROM gossip_npc_option WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT MAX(ID) + 1 FROM gossip_npc_option", CONNECTION_SYNCH);
// GuildColorBackground.db2
@@ -930,6 +930,20 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PrepareStatement(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT ID, ItemLevel, Armor, Weapon FROM item_price_base WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT MAX(ID) + 1 FROM item_price_base", CONNECTION_SYNCH);
+ // ItemRandomProperties.db2
+ PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5"
+ " FROM item_random_properties WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
+ PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT MAX(ID) + 1 FROM item_random_properties", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name_lang FROM item_random_properties_locale WHERE (`VerifiedBuild` > 0) = ?"
+ " AND locale = ?", CONNECTION_SYNCH);
+
+ // ItemRandomSuffix.db2
+ PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5, "
+ "AllocationPct1, AllocationPct2, AllocationPct3, AllocationPct4, AllocationPct5 FROM item_random_suffix WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
+ PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT MAX(ID) + 1 FROM item_random_suffix", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name_lang FROM item_random_suffix_locale WHERE (`VerifiedBuild` > 0) = ?"
+ " AND locale = ?", CONNECTION_SYNCH);
+
// ItemSearchName.db2
PrepareStatement(HOTFIX_SEL_ITEM_SEARCH_NAME, "SELECT AllowableRace, Display, ID, OverallQualityID, ExpansionID, MinFactionID, MinReputation, "
"AllowableClass, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredAbility, ItemLevel, Flags1, Flags2, Flags3, Flags4"
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h
index 350f2531ff5..cc56229d867 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.h
+++ b/src/server/database/Database/Implementation/HotfixDatabase.h
@@ -544,6 +544,14 @@ enum HotfixDatabaseStatements : uint32
HOTFIX_SEL_ITEM_PRICE_BASE,
HOTFIX_SEL_ITEM_PRICE_BASE_MAX_ID,
+ HOTFIX_SEL_ITEM_RANDOM_PROPERTIES,
+ HOTFIX_SEL_ITEM_RANDOM_PROPERTIES_MAX_ID,
+ HOTFIX_SEL_ITEM_RANDOM_PROPERTIES_LOCALE,
+
+ HOTFIX_SEL_ITEM_RANDOM_SUFFIX,
+ HOTFIX_SEL_ITEM_RANDOM_SUFFIX_MAX_ID,
+ HOTFIX_SEL_ITEM_RANDOM_SUFFIX_LOCALE,
+
HOTFIX_SEL_ITEM_SEARCH_NAME,
HOTFIX_SEL_ITEM_SEARCH_NAME_MAX_ID,
HOTFIX_SEL_ITEM_SEARCH_NAME_LOCALE,
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;