diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-06-06 17:56:11 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-06-06 17:56:11 +0200 |
commit | b607bb0a93892734c6a2ce16afc5ea92ffb7fe50 (patch) | |
tree | 213087903a1f64f5fd770863e471e7122f9f2d60 | |
parent | c2751f9195959a199413e332d2b595a60e4a6d35 (diff) |
Core/DataStores: Load ItemModifiedAppearanceExtra.db2
-rw-r--r-- | sql/updates/hotfixes/master/2021_06_06_01_hotfixes.sql | 17 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 5 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.h | 3 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 18 | ||||
-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 | 10 |
7 files changed, 56 insertions, 0 deletions
diff --git a/sql/updates/hotfixes/master/2021_06_06_01_hotfixes.sql b/sql/updates/hotfixes/master/2021_06_06_01_hotfixes.sql new file mode 100644 index 00000000000..c0c43673fdf --- /dev/null +++ b/sql/updates/hotfixes/master/2021_06_06_01_hotfixes.sql @@ -0,0 +1,17 @@ +-- +-- Table structure for table `item_modified_appearance_extra` +-- +DROP TABLE IF EXISTS `item_modified_appearance_extra`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `item_modified_appearance_extra` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `IconFileDataID` int(11) NOT NULL DEFAULT '0', + `UnequippedIconFileDataID` int(11) NOT NULL DEFAULT '0', + `SheatheType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DisplayWeaponSubclassID` tinyint(4) NOT NULL DEFAULT '0', + `DisplayInventoryType` tinyint(4) NOT NULL DEFAULT '0', + `VerifiedBuild` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`VerifiedBuild`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 57c1d975348..3a136952980 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -862,6 +862,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() "TransmogSourceTypeEnum FROM item_modified_appearance WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT MAX(ID) + 1 FROM item_modified_appearance", CONNECTION_SYNCH); + // ItemModifiedAppearanceExtra.db2 + PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_EXTRA, "SELECT ID, IconFileDataID, UnequippedIconFileDataID, SheatheType, " + "DisplayWeaponSubclassID, DisplayInventoryType FROM item_modified_appearance_extra WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_EXTRA, "SELECT MAX(ID) + 1 FROM item_modified_appearance_extra", CONNECTION_SYNCH); + // ItemNameDescription.db2 PrepareStatement(HOTFIX_SEL_ITEM_NAME_DESCRIPTION, "SELECT ID, Description, Color FROM item_name_description WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_NAME_DESCRIPTION, "SELECT MAX(ID) + 1 FROM item_name_description", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 77d62fae5db..29f9ddb17a2 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -506,6 +506,9 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_MAX_ID, + HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_EXTRA, + HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_EXTRA_MAX_ID, + HOTFIX_SEL_ITEM_NAME_DESCRIPTION, HOTFIX_SEL_ITEM_NAME_DESCRIPTION_MAX_ID, HOTFIX_SEL_ITEM_NAME_DESCRIPTION_LOCALE, diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 4763c7d13ed..6b0eefc7670 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -3134,6 +3134,24 @@ struct ItemModifiedAppearanceLoadInfo } }; +struct ItemModifiedAppearanceExtraLoadInfo +{ + static DB2LoadInfo const* Instance() + { + static DB2FieldMeta const fields[] = + { + { false, FT_INT, "ID" }, + { true, FT_INT, "IconFileDataID" }, + { true, FT_INT, "UnequippedIconFileDataID" }, + { false, FT_BYTE, "SheatheType" }, + { true, FT_BYTE, "DisplayWeaponSubclassID" }, + { true, FT_BYTE, "DisplayInventoryType" }, + }; + static DB2LoadInfo const loadInfo(&fields[0], std::extent<decltype(fields)>::value, ItemModifiedAppearanceExtraMeta::Instance(), HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE_EXTRA); + return &loadInfo; + } +}; + struct ItemNameDescriptionLoadInfo { static DB2LoadInfo const* Instance() diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 564967cfd0b..45c10fd399b 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -186,6 +186,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<ItemModifiedAppearanceExtraEntry> sItemModifiedAppearanceExtraStore("ItemModifiedAppearanceExtra.db2", ItemModifiedAppearanceExtraLoadInfo::Instance()); DB2Storage<ItemNameDescriptionEntry> sItemNameDescriptionStore("ItemNameDescription.db2", ItemNameDescriptionLoadInfo::Instance()); DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseLoadInfo::Instance()); DB2Storage<ItemSearchNameEntry> sItemSearchNameStore("ItemSearchName.db2", ItemSearchNameLoadInfo::Instance()); @@ -731,6 +732,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul LOAD_DB2(sItemLimitCategoryStore); LOAD_DB2(sItemLimitCategoryConditionStore); LOAD_DB2(sItemModifiedAppearanceStore); + LOAD_DB2(sItemModifiedAppearanceExtraStore); LOAD_DB2(sItemNameDescriptionStore); LOAD_DB2(sItemPriceBaseStore); LOAD_DB2(sItemSearchNameStore); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 3025bb73ce4..8286f184902 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -143,6 +143,7 @@ TC_GAME_API extern DB2Storage<ItemEntry> sItemStore; TC_GAME_API extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; TC_GAME_API extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore; 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<ItemSearchNameEntry> sItemSearchNameStore; TC_GAME_API extern DB2Storage<ItemSetEntry> sItemSetStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index d8f32bc1bf9..c57bef34f19 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -1985,6 +1985,16 @@ struct ItemModifiedAppearanceEntry int8 TransmogSourceTypeEnum; }; +struct ItemModifiedAppearanceExtraEntry +{ + uint32 ID; + int32 IconFileDataID; + int32 UnequippedIconFileDataID; + uint8 SheatheType; + int8 DisplayWeaponSubclassID; + int8 DisplayInventoryType; +}; + struct ItemNameDescriptionEntry { uint32 ID; |