diff options
-rw-r--r-- | sql/updates/hotfixes/cata_classic/2024_03_14_00_hotfixes.sql | 288 | ||||
-rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 40 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 68 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Metadata.h | 64 | ||||
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 39 | ||||
-rw-r--r-- | src/server/game/Entities/Pet/Pet.cpp | 5 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 37 | ||||
-rw-r--r-- | src/server/game/Handlers/CharacterHandler.cpp | 7 |
8 files changed, 402 insertions, 146 deletions
diff --git a/sql/updates/hotfixes/cata_classic/2024_03_14_00_hotfixes.sql b/sql/updates/hotfixes/cata_classic/2024_03_14_00_hotfixes.sql new file mode 100644 index 00000000000..105e41db5be --- /dev/null +++ b/sql/updates/hotfixes/cata_classic/2024_03_14_00_hotfixes.sql @@ -0,0 +1,288 @@ +-- +-- Table structure for table `item_sparse` +-- + +DROP TABLE IF EXISTS `item_sparse`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `item_sparse` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `AllowableRace` bigint(20) NOT NULL DEFAULT '0', + `Description` text, + `Display3` text, + `Display2` text, + `Display1` text, + `Display` text, + `DmgVariance` float NOT NULL DEFAULT '0', + `DurationInInventory` int(10) unsigned NOT NULL DEFAULT '0', + `QualityModifier` float NOT NULL DEFAULT '0', + `BagFamily` int(10) unsigned NOT NULL DEFAULT '0', + `StartQuestID` int(11) NOT NULL DEFAULT '0', + `ItemRange` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket1` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket2` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket3` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket4` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket5` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket6` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket7` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket8` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket9` float NOT NULL DEFAULT '0', + `StatPercentageOfSocket10` float NOT NULL DEFAULT '0', + `Unknown440_11` int(11) NOT NULL DEFAULT '0', + `Unknown440_12` int(11) NOT NULL DEFAULT '0', + `Unknown440_13` int(11) NOT NULL DEFAULT '0', + `Unknown440_14` int(11) NOT NULL DEFAULT '0', + `Unknown440_15` int(11) NOT NULL DEFAULT '0', + `Unknown440_16` int(11) NOT NULL DEFAULT '0', + `Unknown440_17` int(11) NOT NULL DEFAULT '0', + `Unknown440_18` int(11) NOT NULL DEFAULT '0', + `Unknown440_19` int(11) NOT NULL DEFAULT '0', + `Unknown440_110` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor1` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor2` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor3` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor4` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor5` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor6` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor7` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor8` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor9` int(11) NOT NULL DEFAULT '0', + `StatPercentEditor10` int(11) NOT NULL DEFAULT '0', + `Stackable` int(11) NOT NULL DEFAULT '0', + `MaxCount` int(11) NOT NULL DEFAULT '0', + `MinReputation` int(11) NOT NULL DEFAULT '0', + `RequiredAbility` int(10) unsigned NOT NULL DEFAULT '0', + `SellPrice` int(10) unsigned NOT NULL DEFAULT '0', + `BuyPrice` int(10) unsigned NOT NULL DEFAULT '0', + `VendorStackCount` int(10) unsigned NOT NULL DEFAULT '0', + `PriceVariance` float NOT NULL DEFAULT '0', + `PriceRandomValue` float NOT NULL DEFAULT '0', + `Flags1` int(11) NOT NULL DEFAULT '0', + `Flags2` int(11) NOT NULL DEFAULT '0', + `Flags3` int(11) NOT NULL DEFAULT '0', + `Flags4` int(11) NOT NULL DEFAULT '0', + `FactionRelated` int(11) NOT NULL DEFAULT '0', + `ModifiedCraftingReagentItemID` int(11) NOT NULL DEFAULT '0', + `ContentTuningID` int(11) NOT NULL DEFAULT '0', + `PlayerLevelToItemLevelCurveID` int(11) NOT NULL DEFAULT '0', + `MaxDurability` int(10) unsigned NOT NULL DEFAULT '0', + `ItemNameDescriptionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredTransmogHoliday` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredHoliday` smallint(5) unsigned NOT NULL DEFAULT '0', + `LimitCategory` smallint(5) unsigned NOT NULL DEFAULT '0', + `GemProperties` smallint(5) unsigned NOT NULL DEFAULT '0', + `SocketMatchEnchantmentId` smallint(5) unsigned NOT NULL DEFAULT '0', + `TotemCategoryID` smallint(5) unsigned NOT NULL DEFAULT '0', + `InstanceBound` smallint(5) unsigned NOT NULL DEFAULT '0', + `ZoneBound1` smallint(5) unsigned NOT NULL DEFAULT '0', + `ZoneBound2` smallint(5) unsigned NOT NULL DEFAULT '0', + `ItemSet` smallint(5) unsigned NOT NULL DEFAULT '0', + `LockID` smallint(5) unsigned NOT NULL DEFAULT '0', + `PageID` smallint(5) unsigned NOT NULL DEFAULT '0', + `ItemDelay` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinFactionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkill` smallint(5) unsigned NOT NULL DEFAULT '0', + `ItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0', + `AllowableClass` smallint(6) NOT NULL DEFAULT '0', + `ItemRandomSuffixGroupID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RandomSelect` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinDamage1` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinDamage2` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinDamage3` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinDamage4` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinDamage5` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxDamage1` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxDamage2` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxDamage3` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxDamage4` smallint(5) unsigned NOT NULL DEFAULT '0', + `MaxDamage5` smallint(5) unsigned NOT NULL DEFAULT '0', + `Resistances1` smallint(6) NOT NULL DEFAULT '0', + `Resistances2` smallint(6) NOT NULL DEFAULT '0', + `Resistances3` smallint(6) NOT NULL DEFAULT '0', + `Resistances4` smallint(6) NOT NULL DEFAULT '0', + `Resistances5` smallint(6) NOT NULL DEFAULT '0', + `Resistances6` smallint(6) NOT NULL DEFAULT '0', + `Resistances7` smallint(6) NOT NULL DEFAULT '0', + `ScalingStatDistributionID` smallint(5) unsigned NOT NULL DEFAULT '0', + `StatModifierBonusAmount1` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount2` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount3` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount4` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount5` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount6` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount7` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount8` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount9` smallint(6) NOT NULL DEFAULT '0', + `StatModifierBonusAmount10` smallint(6) NOT NULL DEFAULT '0', + `ExpansionID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ArtifactID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SpellWeight` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SpellWeightCategory` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SocketType1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SocketType2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SocketType3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `SheatheType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Material` tinyint(3) unsigned NOT NULL DEFAULT '0', + `PageMaterialID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LanguageID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Bonding` tinyint(3) unsigned NOT NULL DEFAULT '0', + `DamageDamageType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `StatModifierBonusStat1` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat2` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat3` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat4` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat5` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat6` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat7` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat8` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat9` tinyint(4) NOT NULL DEFAULT '0', + `StatModifierBonusStat10` tinyint(4) NOT NULL DEFAULT '0', + `ContainerSlots` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RequiredPVPMedal` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RequiredPVPRank` tinyint(3) unsigned NOT NULL DEFAULT '0', + `InventoryType` tinyint(4) NOT NULL DEFAULT '0', + `OverallQualityID` tinyint(4) NOT NULL DEFAULT '0', + `AmmunitionType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RequiredLevel` 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 */; + +-- +-- Dumping data for table `item_sparse` +-- + +LOCK TABLES `item_sparse` WRITE; +/*!40000 ALTER TABLE `item_sparse` DISABLE KEYS */; +/*!40000 ALTER TABLE `item_sparse` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `item_sparse_locale` +-- + +DROP TABLE IF EXISTS `item_sparse_locale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `item_sparse_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Description_lang` text, + `Display3_lang` text, + `Display2_lang` text, + `Display1_lang` text, + `Display_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 `item_sparse_locale` +-- + +LOCK TABLES `item_sparse_locale` WRITE; +/*!40000 ALTER TABLE `item_sparse_locale` DISABLE KEYS */; +/*!40000 ALTER TABLE `item_sparse_locale` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `spell_item_enchantment` +-- + +DROP TABLE IF EXISTS `spell_item_enchantment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `spell_item_enchantment` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `HordeName` text, + `Charges` int(11) NOT NULL DEFAULT '0', + `Effect1` int(11) NOT NULL DEFAULT '0', + `Effect2` int(11) NOT NULL DEFAULT '0', + `Effect3` int(11) NOT NULL DEFAULT '0', + `EffectPointsMin1` int(11) NOT NULL DEFAULT '0', + `EffectPointsMin2` int(11) NOT NULL DEFAULT '0', + `EffectPointsMin3` int(11) NOT NULL DEFAULT '0', + `EffectPointsMax1` int(11) NOT NULL DEFAULT '0', + `EffectPointsMax2` int(11) NOT NULL DEFAULT '0', + `EffectPointsMax3` int(11) NOT NULL DEFAULT '0', + `EffectArg1` int(11) NOT NULL DEFAULT '0', + `EffectArg2` int(11) NOT NULL DEFAULT '0', + `EffectArg3` int(11) NOT NULL DEFAULT '0', + `ItemVisual` int(11) NOT NULL DEFAULT '0', + `Flags` int(11) NOT NULL DEFAULT '0', + `EffectScalingPoints1` float NOT NULL DEFAULT '0', + `EffectScalingPoints2` float NOT NULL DEFAULT '0', + `EffectScalingPoints3` float NOT NULL DEFAULT '0', + `ScalingClass` int(11) NOT NULL DEFAULT '0', + `Unk440_1` int(11) NOT NULL DEFAULT '0', + `GemItemID` int(11) NOT NULL DEFAULT '0', + `ConditionID` int(11) NOT NULL DEFAULT '0', + `RequiredSkillID` smallint(5) unsigned NOT NULL DEFAULT '0', + `RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0', + `MinLevel` int(11) NOT NULL DEFAULT '0', + `Unk440_2` int(11) NOT NULL DEFAULT '0', + `Unk440_3` int(11) NOT NULL DEFAULT '0', + `ItemLevel` int(11) NOT NULL DEFAULT '0', + `Unk440_4` int(11) NOT NULL DEFAULT '0', + `Unk440_5` 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 `spell_item_enchantment` +-- + +LOCK TABLES `spell_item_enchantment` WRITE; +/*!40000 ALTER TABLE `spell_item_enchantment` DISABLE KEYS */; +/*!40000 ALTER TABLE `spell_item_enchantment` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `spell_item_enchantment_locale` +-- + +DROP TABLE IF EXISTS `spell_item_enchantment_locale`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `spell_item_enchantment_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `HordeName_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 `spell_item_enchantment_locale` +-- diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index bc54971bc9a..a1059afff5c 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -950,21 +950,22 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, AllowableRace, Description, Display3, Display2, Display1, Display, DmgVariance, " "DurationInInventory, QualityModifier, BagFamily, StartQuestID, ItemRange, StatPercentageOfSocket1, StatPercentageOfSocket2, " "StatPercentageOfSocket3, StatPercentageOfSocket4, StatPercentageOfSocket5, StatPercentageOfSocket6, StatPercentageOfSocket7, " - "StatPercentageOfSocket8, StatPercentageOfSocket9, StatPercentageOfSocket10, StatPercentEditor1, StatPercentEditor2, StatPercentEditor3, " - "StatPercentEditor4, StatPercentEditor5, StatPercentEditor6, StatPercentEditor7, StatPercentEditor8, StatPercentEditor9, StatPercentEditor10, " - "Stackable, MaxCount, MinReputation, RequiredAbility, SellPrice, BuyPrice, VendorStackCount, PriceVariance, PriceRandomValue, Flags1, Flags2, " - "Flags3, Flags4, FactionRelated, ModifiedCraftingReagentItemID, ContentTuningID, PlayerLevelToItemLevelCurveID, MaxDurability, " - "ItemNameDescriptionID, RequiredTransmogHoliday, RequiredHoliday, LimitCategory, GemProperties, SocketMatchEnchantmentId, TotemCategoryID, " - "InstanceBound, ZoneBound1, ZoneBound2, ItemSet, LockID, PageID, ItemDelay, MinFactionID, RequiredSkillRank, RequiredSkill, ItemLevel, " - "AllowableClass, ItemRandomSuffixGroupID, RandomSelect, MinDamage1, MinDamage2, MinDamage3, MinDamage4, MinDamage5, MaxDamage1, MaxDamage2, " - "MaxDamage3, MaxDamage4, MaxDamage5, Resistances1, Resistances2, Resistances3, Resistances4, Resistances5, Resistances6, Resistances7, " - "ScalingStatDistributionID, StatModifierBonusAmount1, StatModifierBonusAmount2, StatModifierBonusAmount3, StatModifierBonusAmount4, " - "StatModifierBonusAmount5, StatModifierBonusAmount6, StatModifierBonusAmount7, StatModifierBonusAmount8, StatModifierBonusAmount9, " - "StatModifierBonusAmount10, ExpansionID, ArtifactID, SpellWeight, SpellWeightCategory, SocketType1, SocketType2, SocketType3, SheatheType, " - "Material, PageMaterialID, LanguageID, Bonding, DamageDamageType, StatModifierBonusStat1, StatModifierBonusStat2, StatModifierBonusStat3, " - "StatModifierBonusStat4, StatModifierBonusStat5, StatModifierBonusStat6, StatModifierBonusStat7, StatModifierBonusStat8, " - "StatModifierBonusStat9, StatModifierBonusStat10, ContainerSlots, RequiredPVPMedal, RequiredPVPRank, InventoryType, OverallQualityID, " - "AmmunitionType, RequiredLevel FROM item_sparse WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + "StatPercentageOfSocket8, StatPercentageOfSocket9, StatPercentageOfSocket10, Unknown440_11, Unknown440_12, Unknown440_13, Unknown440_14, " + "Unknown440_15, Unknown440_16, Unknown440_17, Unknown440_18, Unknown440_19, Unknown440_110, StatPercentEditor1, StatPercentEditor2, " + "StatPercentEditor3, StatPercentEditor4, StatPercentEditor5, StatPercentEditor6, StatPercentEditor7, StatPercentEditor8, StatPercentEditor9, " + "StatPercentEditor10, Stackable, MaxCount, MinReputation, RequiredAbility, SellPrice, BuyPrice, VendorStackCount, PriceVariance, " + "PriceRandomValue, Flags1, Flags2, Flags3, Flags4, FactionRelated, ModifiedCraftingReagentItemID, ContentTuningID, " + "PlayerLevelToItemLevelCurveID, MaxDurability, ItemNameDescriptionID, RequiredTransmogHoliday, RequiredHoliday, LimitCategory, GemProperties, " + "SocketMatchEnchantmentId, TotemCategoryID, InstanceBound, ZoneBound1, ZoneBound2, ItemSet, LockID, PageID, ItemDelay, MinFactionID, " + "RequiredSkillRank, RequiredSkill, ItemLevel, AllowableClass, ItemRandomSuffixGroupID, RandomSelect, MinDamage1, MinDamage2, MinDamage3, " + "MinDamage4, MinDamage5, MaxDamage1, MaxDamage2, MaxDamage3, MaxDamage4, MaxDamage5, Resistances1, Resistances2, Resistances3, Resistances4, " + "Resistances5, Resistances6, Resistances7, ScalingStatDistributionID, StatModifierBonusAmount1, StatModifierBonusAmount2, " + "StatModifierBonusAmount3, StatModifierBonusAmount4, StatModifierBonusAmount5, StatModifierBonusAmount6, StatModifierBonusAmount7, " + "StatModifierBonusAmount8, StatModifierBonusAmount9, StatModifierBonusAmount10, ExpansionID, ArtifactID, SpellWeight, SpellWeightCategory, " + "SocketType1, SocketType2, SocketType3, SheatheType, Material, PageMaterialID, LanguageID, Bonding, DamageDamageType, StatModifierBonusStat1, " + "StatModifierBonusStat2, StatModifierBonusStat3, StatModifierBonusStat4, StatModifierBonusStat5, StatModifierBonusStat6, " + "StatModifierBonusStat7, StatModifierBonusStat8, StatModifierBonusStat9, StatModifierBonusStat10, ContainerSlots, RequiredPVPMedal, " + "RequiredPVPRank, InventoryType, OverallQualityID, AmmunitionType, RequiredLevel FROM item_sparse WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT MAX(ID) + 1 FROM item_sparse", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Description_lang, Display3_lang, Display2_lang, Display1_lang, Display_lang" " FROM item_sparse_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); @@ -1450,11 +1451,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_INTERRUPTS, "SELECT MAX(ID) + 1 FROM spell_interrupts", CONNECTION_SYNCH); // SpellItemEnchantment.db2 - PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name, HordeName, EffectArg1, EffectArg2, EffectArg3, EffectScalingPoints1, " - "EffectScalingPoints2, EffectScalingPoints3, GemItemID, TransmogUseConditionID, TransmogCost, IconFileDataID, EffectPointsMin1, " - "EffectPointsMin2, EffectPointsMin3, EffectPointsMax1, EffectPointsMax2, EffectPointsMax3, ItemVisual, Flags, RequiredSkillID, " - "RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ScalingClass, ScalingClassRestricted, ConditionID, MinLevel, MaxLevel" - " FROM spell_item_enchantment WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name, HordeName, Charges, Effect1, Effect2, Effect3, EffectPointsMin1, " + "EffectPointsMin2, EffectPointsMin3, EffectPointsMax1, EffectPointsMax2, EffectPointsMax3, EffectArg1, EffectArg2, EffectArg3, ItemVisual, " + "Flags, EffectScalingPoints1, EffectScalingPoints2, EffectScalingPoints3, ScalingClass, Unk440_1, GemItemID, ConditionID, RequiredSkillID, " + "RequiredSkillRank, MinLevel, Unk440_2, Unk440_3, ItemLevel, Unk440_4, Unk440_5 FROM spell_item_enchantment WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT MAX(ID) + 1 FROM spell_item_enchantment", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name_lang, HordeName_lang FROM spell_item_enchantment_locale" " WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH); diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index 65e90a37e91..84dbfd6975b 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -2980,7 +2980,7 @@ struct ItemSetSpellLoadInfo struct ItemSparseLoadInfo { - static constexpr DB2FieldMeta Fields[130] = + static constexpr DB2FieldMeta Fields[140] = { { false, FT_INT, "ID" }, { true, FT_LONG, "AllowableRace" }, @@ -3005,6 +3005,16 @@ struct ItemSparseLoadInfo { false, FT_FLOAT, "StatPercentageOfSocket8" }, { false, FT_FLOAT, "StatPercentageOfSocket9" }, { false, FT_FLOAT, "StatPercentageOfSocket10" }, + { true, FT_INT, "Unknown440_11" }, + { true, FT_INT, "Unknown440_12" }, + { true, FT_INT, "Unknown440_13" }, + { true, FT_INT, "Unknown440_14" }, + { true, FT_INT, "Unknown440_15" }, + { true, FT_INT, "Unknown440_16" }, + { true, FT_INT, "Unknown440_17" }, + { true, FT_INT, "Unknown440_18" }, + { true, FT_INT, "Unknown440_19" }, + { true, FT_INT, "Unknown440_110" }, { true, FT_INT, "StatPercentEditor1" }, { true, FT_INT, "StatPercentEditor2" }, { true, FT_INT, "StatPercentEditor3" }, @@ -3114,7 +3124,7 @@ struct ItemSparseLoadInfo { true, FT_BYTE, "RequiredLevel" }, }; - static constexpr DB2LoadInfo Instance{ Fields, 130, &ItemSparseMeta::Instance, HOTFIX_SEL_ITEM_SPARSE }; + static constexpr DB2LoadInfo Instance{ Fields, 140, &ItemSparseMeta::Instance, HOTFIX_SEL_ITEM_SPARSE }; }; struct ItemSpecLoadInfo @@ -4785,36 +4795,36 @@ struct SpellItemEnchantmentLoadInfo { false, FT_INT, "ID" }, { false, FT_STRING, "Name" }, { false, FT_STRING, "HordeName" }, - { false, FT_INT, "EffectArg1" }, - { false, FT_INT, "EffectArg2" }, - { false, FT_INT, "EffectArg3" }, + { true, FT_INT, "Charges" }, + { true, FT_INT, "Effect1" }, + { true, FT_INT, "Effect2" }, + { true, FT_INT, "Effect3" }, + { true, FT_INT, "EffectPointsMin1" }, + { true, FT_INT, "EffectPointsMin2" }, + { true, FT_INT, "EffectPointsMin3" }, + { true, FT_INT, "EffectPointsMax1" }, + { true, FT_INT, "EffectPointsMax2" }, + { true, FT_INT, "EffectPointsMax3" }, + { true, FT_INT, "EffectArg1" }, + { true, FT_INT, "EffectArg2" }, + { true, FT_INT, "EffectArg3" }, + { true, FT_INT, "ItemVisual" }, + { true, FT_INT, "Flags" }, { false, FT_FLOAT, "EffectScalingPoints1" }, { false, FT_FLOAT, "EffectScalingPoints2" }, { false, FT_FLOAT, "EffectScalingPoints3" }, - { false, FT_INT, "GemItemID" }, - { false, FT_INT, "TransmogUseConditionID" }, - { false, FT_INT, "TransmogCost" }, - { false, FT_INT, "IconFileDataID" }, - { true, FT_SHORT, "EffectPointsMin1" }, - { true, FT_SHORT, "EffectPointsMin2" }, - { true, FT_SHORT, "EffectPointsMin3" }, - { true, FT_SHORT, "EffectPointsMax1" }, - { true, FT_SHORT, "EffectPointsMax2" }, - { true, FT_SHORT, "EffectPointsMax3" }, - { false, FT_SHORT, "ItemVisual" }, - { false, FT_SHORT, "Flags" }, - { false, FT_SHORT, "RequiredSkillID" }, - { false, FT_SHORT, "RequiredSkillRank" }, - { false, FT_SHORT, "ItemLevel" }, - { false, FT_BYTE, "Charges" }, - { false, FT_BYTE, "Effect1" }, - { false, FT_BYTE, "Effect2" }, - { false, FT_BYTE, "Effect3" }, - { true, FT_BYTE, "ScalingClass" }, - { true, FT_BYTE, "ScalingClassRestricted" }, - { false, FT_BYTE, "ConditionID" }, - { false, FT_BYTE, "MinLevel" }, - { false, FT_BYTE, "MaxLevel" }, + { true, FT_INT, "ScalingClass" }, + { true, FT_INT, "Unk440_1" }, + { true, FT_INT, "GemItemID" }, + { true, FT_INT, "ConditionID" }, + { true, FT_INT, "RequiredSkillID" }, + { true, FT_INT, "RequiredSkillRank" }, + { true, FT_INT, "MinLevel" }, + { true, FT_INT, "Unk440_2" }, + { true, FT_INT, "Unk440_3" }, + { true, FT_INT, "ItemLevel" }, + { true, FT_INT, "Unk440_4" }, + { true, FT_INT, "Unk440_5" }, }; static constexpr DB2LoadInfo Instance{ Fields, 33, &SpellItemEnchantmentMeta::Instance, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT }; diff --git a/src/server/game/DataStores/DB2Metadata.h b/src/server/game/DataStores/DB2Metadata.h index 333f784951d..be259b097df 100644 --- a/src/server/game/DataStores/DB2Metadata.h +++ b/src/server/game/DataStores/DB2Metadata.h @@ -2968,11 +2968,11 @@ struct CreatureImmunitiesMeta { FT_BYTE, 1, false }, { FT_BYTE, 1, false }, { FT_INT, 2, true }, - { FT_INT, 10, false }, + { FT_INT, 11, false }, { FT_INT, 20, false }, }; - static constexpr DB2Meta Instance{ 1131322, -1, 9, 9, 0x1B605529, Fields, -1 }; + static constexpr DB2Meta Instance{ 1131322, -1, 9, 9, 0x6103DDDA, Fields, -1 }; }; struct CreatureModelDataMeta @@ -5647,10 +5647,10 @@ struct ItemRandomPropertiesMeta static constexpr DB2MetaField Fields[2] = { { FT_STRING, 1, true }, - { FT_SHORT, 5, false }, + { FT_SHORT, 5, true }, }; - static constexpr DB2Meta Instance{ 1237441, -1, 2, 2, 0xA74D16F8, Fields, -1 }; + static constexpr DB2Meta Instance{ 1237441, -1, 2, 2, 0x0D2C3577, Fields, -1 }; }; struct ItemRandomSuffixMeta @@ -5658,11 +5658,11 @@ struct ItemRandomSuffixMeta static constexpr DB2MetaField Fields[3] = { { FT_STRING, 1, true }, - { FT_SHORT, 5, false }, - { FT_SHORT, 5, false }, + { FT_INT, 5, true }, + { FT_INT, 5, true }, }; - static constexpr DB2Meta Instance{ 1237592, -1, 3, 3, 0x0FF4E63B, Fields, -1 }; + static constexpr DB2Meta Instance{ 1237592, -1, 3, 3, 0x07FFE191, Fields, -1 }; }; struct ItemRangedDisplayInfoMeta @@ -5680,8 +5680,9 @@ struct ItemRangedDisplayInfoMeta struct ItemReforgeMeta { - static constexpr DB2MetaField Fields[5] = + static constexpr DB2MetaField Fields[6] = { + { FT_INT, 1, true }, { FT_SHORT, 1, false }, { FT_FLOAT, 1, true }, { FT_SHORT, 1, false }, @@ -5689,7 +5690,7 @@ struct ItemReforgeMeta { FT_SHORT, 1, false }, }; - static constexpr DB2Meta Instance{ 5633983, -1, 5, 5, 0xE91C7760, Fields, -1 }; + static constexpr DB2Meta Instance{ 5633983, 0, 6, 6, 0xF3A870E9, Fields, -1 }; }; struct ItemSearchNameMeta @@ -5744,7 +5745,7 @@ struct ItemSetSpellMeta struct ItemSparseMeta { - static constexpr DB2MetaField Fields[73] = + static constexpr DB2MetaField Fields[74] = { { FT_LONG, 1, true }, { FT_STRING, 1, true }, @@ -5760,6 +5761,7 @@ struct ItemSparseMeta { FT_FLOAT, 1, true }, { FT_FLOAT, 10, true }, { FT_INT, 10, true }, + { FT_INT, 10, true }, { FT_INT, 1, true }, { FT_INT, 1, true }, { FT_INT, 1, true }, @@ -5821,7 +5823,7 @@ struct ItemSparseMeta { FT_BYTE, 1, true }, }; - static constexpr DB2Meta Instance{ 1572924, -1, 73, 73, 0xD532973D, Fields, -1 }; + static constexpr DB2Meta Instance{ 1572924, -1, 74, 74, 0xE3090D23, Fields, -1 }; }; struct ItemSpecMeta @@ -9643,29 +9645,29 @@ struct SpellItemEnchantmentMeta { { FT_STRING, 1, true }, { FT_STRING, 1, true }, - { FT_INT, 3, false }, + { FT_INT, 1, true }, + { FT_INT, 3, true }, + { FT_INT, 3, true }, + { FT_INT, 3, true }, + { FT_INT, 3, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, { FT_FLOAT, 3, true }, - { FT_INT, 1, false }, - { FT_INT, 1, false }, - { FT_INT, 1, false }, - { FT_INT, 1, false }, - { FT_SHORT, 3, true }, - { FT_SHORT, 3, true }, - { FT_SHORT, 1, false }, - { FT_SHORT, 1, false }, - { FT_SHORT, 1, false }, - { FT_SHORT, 1, false }, - { FT_SHORT, 1, false }, - { FT_BYTE, 1, false }, - { FT_BYTE, 3, false }, - { FT_BYTE, 1, true }, - { FT_BYTE, 1, true }, - { FT_BYTE, 1, false }, - { FT_BYTE, 1, false }, - { FT_BYTE, 1, false }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, + { FT_INT, 1, true }, }; - static constexpr DB2Meta Instance{ 1362771, -1, 22, 22, 0x18AA1166, Fields, -1 }; + static constexpr DB2Meta Instance{ 1362771, -1, 22, 22, 0x31CF18E7, Fields, -1 }; }; struct SpellItemEnchantmentConditionMeta diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 1b270288c6e..4a9840e25fa 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -2288,6 +2288,7 @@ struct ItemSparseEntry int32 StartQuestID; float ItemRange; std::array<float, MAX_ITEM_PROTO_STATS> StatPercentageOfSocket; + std::array<int32, MAX_ITEM_PROTO_STATS> Unknown440_1; std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor; int32 Stackable; int32 MaxCount; @@ -3462,26 +3463,26 @@ struct SpellItemEnchantmentEntry uint32 ID; LocalizedString Name; LocalizedString HordeName; - std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectArg; + int32 Charges; + std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> Effect; + std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMin; + std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMax; + std::array<int32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectArg; + int32 ItemVisual; + int32 Flags; std::array<float, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectScalingPoints; - uint32 GemItemID; - uint32 TransmogUseConditionID; - uint32 TransmogCost; - uint32 IconFileDataID; - std::array<int16, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMin; - std::array<int16, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectPointsMax; - uint16 ItemVisual; - uint16 Flags; - uint16 RequiredSkillID; - uint16 RequiredSkillRank; - uint16 ItemLevel; - uint8 Charges; - std::array<uint8, MAX_ITEM_ENCHANTMENT_EFFECTS> Effect; - int8 ScalingClass; - int8 ScalingClassRestricted; - uint8 ConditionID; - uint8 MinLevel; - uint8 MaxLevel; + int32 ScalingClass; + int32 Unk440_1; + int32 GemItemID; + int32 ConditionID; + int32 RequiredSkillID; + int32 RequiredSkillRank; + int32 MinLevel; + int32 Unk440_2; + int32 Unk440_3; + int32 ItemLevel; + int32 Unk440_4; + int32 Unk440_5; EnumFlag<SpellItemEnchantmentFlags> GetFlags() const { return static_cast<SpellItemEnchantmentFlags>(Flags); } }; diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 2d2cac13da0..e80d629c1c4 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -911,9 +911,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) uint32 health = uint32(basehp * healthmod); uint32 mana = stats->GenerateMana(m_creatureDifficulty); - CreatureDifficulty const* creatureDifficulty = GetCreatureDifficulty(); - SetCreateHealth(std::max(sDB2Manager.EvaluateExpectedStat(ExpectedStatType::CreatureHealth, petlevel, creatureDifficulty->GetHealthScalingExpansion(), m_unitData->ContentTuningID, Classes(cinfo->unit_class), 0) * creatureDifficulty->HealthModifier * GetHealthMod(cinfo->Classification), 1.0f)); - SetCreateMana(stats->BaseMana); + SetCreateHealth(health); + SetCreateMana(mana); SetCreateStat(STAT_STRENGTH, 22); SetCreateStat(STAT_AGILITY, 22); SetCreateStat(STAT_STAMINA, 25); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9c916689153..7429c4ee48d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -13334,48 +13334,11 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool } break; case ITEM_ENCHANTMENT_TYPE_RESISTANCE: - if (pEnchant->ScalingClass) - { - int32 scalingClass = pEnchant->ScalingClass; - if ((*m_unitData->MinItemLevel || *m_unitData->MaxItemLevel) && pEnchant->ScalingClassRestricted) - scalingClass = pEnchant->ScalingClassRestricted; - - uint8 minLevel = pEnchant->GetFlags().HasFlag(SpellItemEnchantmentFlags::ScaleAsAGem) ? 1 : 60; - uint8 scalingLevel = GetLevel(); - uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1); - - if (minLevel > GetLevel()) - scalingLevel = minLevel; - else if (maxLevel < GetLevel()) - scalingLevel = maxLevel; - - if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel)) - enchant_amount = uint32(pEnchant->EffectScalingPoints[s] * GetSpellScalingColumnForClass(spellScaling, scalingClass)); - } enchant_amount = std::max(enchant_amount, 1u); HandleStatFlatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + enchant_spell_id), TOTAL_VALUE, float(enchant_amount), apply); break; case ITEM_ENCHANTMENT_TYPE_STAT: { - if (pEnchant->ScalingClass) - { - int32 scalingClass = pEnchant->ScalingClass; - if ((*m_unitData->MinItemLevel || *m_unitData->MaxItemLevel) && pEnchant->ScalingClassRestricted) - scalingClass = pEnchant->ScalingClassRestricted; - - uint8 minLevel = pEnchant->GetFlags().HasFlag(SpellItemEnchantmentFlags::ScaleAsAGem) ? 1 : 60; - uint8 scalingLevel = GetLevel(); - uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1); - - if (minLevel > GetLevel()) - scalingLevel = minLevel; - else if (maxLevel < GetLevel()) - scalingLevel = maxLevel; - - if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel)) - enchant_amount = uint32(pEnchant->EffectScalingPoints[s] * GetSpellScalingColumnForClass(spellScaling, scalingClass)); - } - enchant_amount = std::max(enchant_amount, 1u); TC_LOG_DEBUG("entities.player.items", "Adding {} to stat nb {}", enchant_amount, enchant_spell_id); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 8bcb9011c69..01d75d58b51 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1951,13 +1951,6 @@ void WorldSession::HandleEquipmentSetSave(WorldPackets::EquipmentSet::SaveEquipm if (!illusion->ItemVisual || !illusion->GetFlags().HasFlag(SpellItemEnchantmentFlags::AllowTransmog)) return false; - if (PlayerConditionEntry const* condition = sPlayerConditionStore.LookupEntry(illusion->TransmogUseConditionID)) - if (!sConditionMgr->IsPlayerMeetingCondition(_player, condition)) - return false; - - if (illusion->ScalingClassRestricted > 0 && uint8(illusion->ScalingClassRestricted) != _player->GetClass()) - return false; - return true; }; |