diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-05-28 22:28:22 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-05-28 22:28:22 +0200 |
commit | 72ef4ccf77eb97717e1cc621a409b38311dbfb7f (patch) | |
tree | 50e174f8d8d136bb881f8769e072224f7bd0aad2 | |
parent | d081813212411183d934aed897a9fc64815bf6f0 (diff) |
Core/Datastores: named unknown fields for CurrencyTypes
4 files changed, 78 insertions, 5 deletions
diff --git a/sql/updates/hotfixes/cata_classic/2024_05_28_00_hotfixes.sql b/sql/updates/hotfixes/cata_classic/2024_05_28_00_hotfixes.sql new file mode 100644 index 00000000000..dcfa0ec34b5 --- /dev/null +++ b/sql/updates/hotfixes/cata_classic/2024_05_28_00_hotfixes.sql @@ -0,0 +1,73 @@ +-- +-- Table structure for table `currency_types` +-- + +DROP TABLE IF EXISTS `currency_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `currency_types` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Description` text, + `CategoryID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `InventoryIconFileID` int(11) NOT NULL DEFAULT '0', + `SpellWeight` int(10) unsigned NOT NULL DEFAULT '0', + `SpellCategory` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxQty` int(10) unsigned NOT NULL DEFAULT '0', + `MaxEarnablePerWeek` int(10) unsigned NOT NULL DEFAULT '0', + `Quality` tinyint(4) NOT NULL DEFAULT '0', + `FactionID` int(11) NOT NULL DEFAULT '0', + `AwardConditionID` int(11) NOT NULL DEFAULT '0', + `MaxQtyWorldStateID` int(11) NOT NULL DEFAULT '0', + `Flags1` int(11) NOT NULL DEFAULT '0', + `Flags2` int(11) 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 */; + +-- +-- Dumping data for table `currency_types` +-- + +LOCK TABLES `currency_types` WRITE; +/*!40000 ALTER TABLE `currency_types` DISABLE KEYS */; +/*!40000 ALTER TABLE `currency_types` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `currency_types_locale` +-- + +DROP TABLE IF EXISTS `currency_types_locale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `currency_types_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Description_lang` text, + `VerifiedBuild` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci +/*!50500 PARTITION BY LIST COLUMNS(locale) +(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB, + PARTITION esES VALUES IN ('esES') ENGINE = InnoDB, + PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB, + PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB, + PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB, + PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB, + PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB, + PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB, + PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB, + PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `currency_types_locale` +-- + +LOCK TABLES `currency_types_locale` WRITE; +/*!40000 ALTER TABLE `currency_types_locale` DISABLE KEYS */; +/*!40000 ALTER TABLE `currency_types_locale` ENABLE KEYS */; +UNLOCK TABLES; diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index 5a6936938f7..8c5fc8ec88d 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -493,7 +493,7 @@ void HotfixDatabaseConnection::DoPrepareStatements() // CurrencyTypes.db2 PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name, Description, CategoryID, InventoryIconFileID, SpellWeight, SpellCategory, MaxQty, " - "MaxEarnablePerWeek, Quality, FactionID, Field_3_4_3_51278_010, Field_4_4_0_54137_011, Flags1, Flags2 FROM currency_types" + "MaxEarnablePerWeek, Quality, FactionID, AwardConditionID, MaxQtyWorldStateID, Flags1, Flags2 FROM currency_types" " WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT MAX(ID) + 1 FROM currency_types", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, Description_lang FROM currency_types_locale WHERE (`VerifiedBuild` > 0) = ?" diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 48d876c8009..feabfc035fe 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -1467,8 +1467,8 @@ struct CurrencyTypesLoadInfo { false, FT_INT, "MaxEarnablePerWeek" }, { true, FT_BYTE, "Quality" }, { true, FT_INT, "FactionID" }, - { true, FT_INT, "Field_3_4_3_51278_010" }, - { true, FT_INT, "Field_4_4_0_54137_011" }, + { true, FT_INT, "AwardConditionID" }, + { true, FT_INT, "MaxQtyWorldStateID" }, { true, FT_INT, "Flags1" }, { true, FT_INT, "Flags2" }, }; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index eebf8bcf1ad..242a1140cb6 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -1278,8 +1278,8 @@ struct CurrencyTypesEntry uint32 MaxEarnablePerWeek; int8 Quality; int32 FactionID; - int32 Field_3_4_3_51278_010; - int32 Field_4_4_0_54137_011; + int32 AwardConditionID; + int32 MaxQtyWorldStateID; std::array<int32, 2> Flags; EnumFlag<CurrencyTypesFlags> GetFlags() const { return static_cast<CurrencyTypesFlags>(Flags[0]); } |