Naxxramas: The Face of Death and The Hungering Cold exist again
Both items are in the client Item.db2 but not in its ItemSparse.db2, so the server had no such items and their loot rows dropped nothing. Reported with a fix pack by SIN, thanks. - hotfixes 2026_11_12_39: item_sparse rows for 23043 and 23577 from the vanilla items, written by gen_hotfix_items.py, sent through hotfix_data; +6 swords on 23577 as an item_effect row (spell 15763) - world 2026_11_12_40: vanilla durability 120 and 105 - gen_hotfix_items.py --shield-armor: vanilla armor above the client table is bonus armor (stat 50), as the client stores it: shields get vanilla minus ItemArmorShield, weapons all of it. The Face of Death: 3354 + 140 = 3494. (cherry picked from commit 565ffc4fc40655d74b18d44a7124faafd5176b8e)
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
-- Classic 1.60 (WoW Forever): Naxxramas items The Face of Death (23043, shield) and The Hungering Cold (23577, one-hand sword).
|
||||
-- Both are in the client Item.db2 but not in its ItemSparse.db2, so the server had no such items: their loot rows (reference
|
||||
-- 30466 and 30470) dropped nothing. Two item_sparse rows from the vMaNGOS 1.12 items, written by
|
||||
-- tools/classic_items/gen_hotfix_items.py (with --shield-armor), sent to clients through hotfix_data:
|
||||
-- 23043: 3354 shield armor from the client table + 140 bonus armor = 3494, 21 stamina, 3% block as 15 block rating,
|
||||
-- 21 block value (shield block 66 is in item_classic_block), item level 90.
|
||||
-- 23577: 76-143 damage at 1.5 speed from the client table, 14 stamina, 140 bonus armor, +6 swords (spell 15763 as an
|
||||
-- item_effect row), item level 89.
|
||||
-- Check in game: ".additem 23043" and ".additem 23577" show the items with these stats. Safe to run again.
|
||||
DELETE FROM `item_sparse` WHERE `ID` IN (23043,23577);
|
||||
INSERT INTO `item_sparse` (`ID`,`Description`,`Display3`,`Display2`,`Display1`,`Display`,`ExpansionID`,`DmgVariance`,`LimitCategory`,`DurationInInventory`,`QualityModifier`,`BagFamily`,`StartQuestID`,`LanguageID`,`ItemRange`,`StatPercentageOfSocket1`,`StatPercentageOfSocket2`,`StatPercentageOfSocket3`,`StatPercentageOfSocket4`,`StatPercentageOfSocket5`,`StatPercentageOfSocket6`,`StatPercentageOfSocket7`,`StatPercentageOfSocket8`,`StatPercentageOfSocket9`,`StatPercentageOfSocket10`,`StatPercentEditor1`,`StatPercentEditor2`,`StatPercentEditor3`,`StatPercentEditor4`,`StatPercentEditor5`,`StatPercentEditor6`,`StatPercentEditor7`,`StatPercentEditor8`,`StatPercentEditor9`,`StatPercentEditor10`,`StatModifierBonusStat1`,`StatModifierBonusStat2`,`StatModifierBonusStat3`,`StatModifierBonusStat4`,`StatModifierBonusStat5`,`StatModifierBonusStat6`,`StatModifierBonusStat7`,`StatModifierBonusStat8`,`StatModifierBonusStat9`,`StatModifierBonusStat10`,`Stackable`,`MaxCount`,`MinReputation`,`RequiredAbility`,`AllowableRace1`,`AllowableRace2`,`SellPrice`,`BuyPrice`,`VendorStackCount`,`PriceVariance`,`PriceRandomValue`,`Flags1`,`Flags2`,`Flags3`,`Flags4`,`Flags5`,`FactionRelated`,`ModifiedCraftingReagentItemID`,`ContentTuningID`,`PlayerLevelToItemLevelCurveID`,`ItemLevelOffsetCurveID`,`ItemLevelOffsetItemLevel`,`ItemSquishEraID`,`ItemNameDescriptionID`,`RequiredTransmogHoliday`,`RequiredHoliday`,`GemProperties`,`SocketMatchEnchantmentId`,`TotemCategoryID`,`InstanceBound`,`ZoneBound1`,`ZoneBound2`,`ItemSet`,`LockID`,`PageID`,`ItemDelay`,`MinFactionID`,`RequiredSkillRank`,`RequiredSkill`,`ItemLevel`,`AllowableClass`,`ArtifactID`,`SpellWeight`,`SpellWeightCategory`,`SocketType1`,`SocketType2`,`SocketType3`,`SheatheType`,`Material`,`PageMaterialID`,`Bonding`,`DamageDamageType`,`ContainerSlots`,`RequiredPVPMedal`,`RequiredPVPRank`,`RequiredLevel`,`InventoryType`,`OverallQualityID`,`AmmunitionType`,`VerifiedBuild`) VALUES
|
||||
(23043,'','','','','The Face of Death',0,0,0,0,0.0,0,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,6176,41176,4412,6176,0,0,0,0,0,0,7,50,15,48,-1,-1,-1,-1,-1,-1,1,0,0,0,-1,-1,174810,874054,1,1.0,1.0,0,24580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,-1,0,0,0,0,0,0,4,6,0,1,0,0,0,0,60,14,4,0,70938),
|
||||
(23577,'','','','','The Hungering Cold',0,0.6,0,0,0.0,0,0,0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5600,56000,0,0,0,0,0,0,0,0,7,50,-1,-1,-1,-1,-1,-1,-1,-1,1,1,0,0,-1,-1,269253,1346265,1,1.0,1.0,0,24580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1500,0,0,0,89,-1,0,0,0,0,0,0,3,1,0,1,0,0,0,0,60,13,4,0,70938);
|
||||
|
||||
DELETE FROM `hotfix_data` WHERE `TableHash` = 2442913102 AND `RecordId` IN (23043,23577);
|
||||
INSERT INTO `hotfix_data` (`Id`,`UniqueId`,`TableHash`,`RecordId`,`Status`,`VerifiedBuild`) VALUES
|
||||
(2088000,1397880000,2442913102,23043,1,70938),
|
||||
(2088001,1397880001,2442913102,23577,1,70938);
|
||||
|
||||
DELETE FROM `item_effect` WHERE `ID` IN (9910101);
|
||||
INSERT INTO `item_effect` (`ID`,`LegacySlotIndex`,`TriggerType`,`Charges`,`CoolDownMSec`,`CategoryCoolDownMSec`,`SpellCategoryID`,`SpellID`,`ChrSpecializationID`,`PlayerConditionID`,`VerifiedBuild`) VALUES
|
||||
(9910101,0,1,0,-1,-1,0,15763,0,0,70938);
|
||||
DELETE FROM `item_x_item_effect` WHERE `ID` IN (9910101);
|
||||
INSERT INTO `item_x_item_effect` (`ID`,`ItemEffectID`,`ItemID`,`VerifiedBuild`) VALUES
|
||||
(9910101,9910101,23577,70938);
|
||||
DELETE FROM `hotfix_data` WHERE (`TableHash` = 1073915313 OR `TableHash` = 13330255) AND `RecordId` IN (9910101);
|
||||
INSERT INTO `hotfix_data` (`Id`,`UniqueId`,`TableHash`,`RecordId`,`Status`,`VerifiedBuild`) VALUES
|
||||
(2088002,1397880002,1073915313,9910101,1,70938),
|
||||
(2088003,1397880003,13330255,9910101,1,70938);
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
-- Classic 1.60 (WoW Forever): vanilla durability of the two Naxxramas items added in hotfixes 2026_11_12_39 (The Face of Death
|
||||
-- 23043: 120, The Hungering Cold 23577: 105, VMaNGOS item_template.max_durability). 2026_10_26_00 lists only items the client
|
||||
-- already had. Safe to run again.
|
||||
DELETE FROM `classic_item_durability` WHERE `entry` IN (23043,23577);
|
||||
INSERT INTO `classic_item_durability` (`entry`, `max_durability`) VALUES
|
||||
(23043,120),
|
||||
(23577,105);
|
||||
@@ -25,4 +25,8 @@ Inputs: the 70532 `ItemSparse.db2` and `RandPropPoints.db2`, and a vMaNGOS world
|
||||
|
||||
Stats: value = allocation x RandPropPoints(item level, quality, slot) / 10000, rounded, as `Item::GetItemStatValue` and the
|
||||
client tooltip compute it. Vanilla percentage bonuses are stored as rating: 14 crit, 10 hit, 12 dodge, 15 parry, 5 block per 1%.
|
||||
Weapon damage and armor are not in ItemSparse; both sides take them from the item level and quality tables.
|
||||
Weapon damage and armor are not in ItemSparse; both sides take them from the item level and quality tables. Vanilla armor
|
||||
above that is stat 50 (bonus armor) in the client. With `--shield-armor ItemArmorShield.db2` (client file) the tool writes it
|
||||
for shields (vanilla armor minus the table armor for the item level and quality) and weapons (all their vanilla armor, as the
|
||||
client does it on 9 of the 11 weapons both sides have). Cloth to plate and rings, necks and off-hand items are left out.
|
||||
Example: The Face of Death (23043), 3494 armor in vanilla, 3354 from the table at item level 90 epic, gets +140 bonus armor.
|
||||
|
||||
@@ -19,7 +19,7 @@ same, which is the check that the conversion matches the client's own items.
|
||||
usage:
|
||||
gen_hotfix_items.py --validate <ItemSparse.db2> <RandPropPoints.db2> <vmangos db> [--effects <ItemEffect.db2> <ItemXItemEffect.db2> <SpellEffect.db2>]
|
||||
gen_hotfix_items.py <ItemSparse.db2> <RandPropPoints.db2> <vmangos db> <ids file> <out.sql> <first hotfix_data Id> <first UniqueId> [VerifiedBuild]
|
||||
[--effects <ItemEffect.db2> <ItemXItemEffect.db2> <SpellEffect.db2>] [--first-effect-id <id>]
|
||||
[--effects <ItemEffect.db2> <ItemXItemEffect.db2> <SpellEffect.db2>] [--first-effect-id <id>] [--shield-armor <ItemArmorShield.db2>]
|
||||
"""
|
||||
import collections
|
||||
import os
|
||||
@@ -40,6 +40,7 @@ EFFECT_COLUMNS = ['ID', 'LegacySlotIndex', 'TriggerType', 'Charges', 'CoolDownMS
|
||||
# vMaNGOS stat_typeN keeps the modern ITEM_MOD ids for these
|
||||
BASE_STATS = {0: 0, 1: 1, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7}
|
||||
# vMaNGOS resistance columns -> ITEM_MOD_*_RESISTANCE
|
||||
EXTRA_ARMOR = 50 # ITEM_MOD_EXTRA_ARMOR
|
||||
RESISTANCES = {'fire_res': 51, 'frost_res': 52, 'holy_res': 53, 'shadow_res': 54, 'nature_res': 55, 'arcane_res': 56}
|
||||
SCHOOL_RESIST = {2: 53, 4: 51, 8: 55, 16: 52, 32: 54, 64: 56}
|
||||
SCHOOL_DAMAGE = {2: 84, 4: 85, 8: 86, 16: 87, 32: 88, 64: 89}
|
||||
@@ -117,9 +118,11 @@ def rand_prop_points(rpp, ilvl, quality, inv, subclass):
|
||||
|
||||
|
||||
class Converter:
|
||||
def __init__(self, sparse_path, rpp_path, vmdb, effect_paths=None):
|
||||
def __init__(self, sparse_path, rpp_path, vmdb, effect_paths=None, shield_armor_path=None):
|
||||
self.sparse = itemsparse.read_sparse(sparse_path)
|
||||
self.rpp = itemsparse.read_randproppoints(rpp_path)
|
||||
# ItemArmorShield.db2 of the client: base shield armor per item level and quality, for the bonus armor (stat 50)
|
||||
self.shield_armor = itemsparse.read_armor_shield(shield_armor_path) if shield_armor_path else None
|
||||
# effect_paths: ItemEffect.db2, ItemXItemEffect.db2, SpellEffect.db2 of the client
|
||||
self.client_effects = itemsparse.read_item_effects(*effect_paths[:2]) if effect_paths else {}
|
||||
self.spell_auras = itemsparse.read_spell_auras(effect_paths[2]) if effect_paths else {}
|
||||
@@ -202,6 +205,9 @@ class Converter:
|
||||
for col, t in RESISTANCES.items():
|
||||
if v[col]:
|
||||
st[t] = st.get(t, 0) + v[col]
|
||||
extra = self.extra_armor(v)
|
||||
if extra > 0:
|
||||
st[EXTRA_ARMOR] = st.get(EXTRA_ARMOR, 0) + extra
|
||||
left = []
|
||||
auras = self.equip_auras(v)
|
||||
by_spell = collections.defaultdict(list)
|
||||
@@ -232,6 +238,25 @@ class Converter:
|
||||
left.append(sid)
|
||||
return st, ([] if linked_auras is not None else left)
|
||||
|
||||
def extra_armor(self, v):
|
||||
"""Vanilla armor above what the client gives the item from its item level and quality, which the client stores as stat 50.
|
||||
|
||||
Shields get their base armor from ItemArmorShield (ItemTemplate::GetArmor), so the bonus is the rest of the vanilla armor.
|
||||
Weapons get no base armor, so all of it is bonus (the client has it on 9 of the 11 weapons with armor both sides have, 5 at
|
||||
the vanilla value). Not handled, 0: cloth to plate (base from ItemArmorTotal and the slot) and miscellaneous armor (the client
|
||||
keeps the armor on 5 of 13 rings, necks and off-hand items), and everything without the table."""
|
||||
if not v['armor'] or self.shield_armor is None:
|
||||
return 0
|
||||
if v['class'] == 2:
|
||||
return v['armor']
|
||||
if v['class'] == 4 and v['subclass'] == 6:
|
||||
base = self.shield_armor.get(v['item_level'])
|
||||
quality = v['quality'] if v['quality'] != 7 else 3 # heirloom reads as rare, as in GetArmor
|
||||
if base is None or quality > 6:
|
||||
return 0
|
||||
return v['armor'] - int(base[quality] + 0.5)
|
||||
return 0
|
||||
|
||||
def linked_auras(self, id_):
|
||||
"""Aura types of the equip spells the client links to the item, None when it links none."""
|
||||
if id_ not in self.client_effects:
|
||||
@@ -418,18 +443,23 @@ def main():
|
||||
k = args.index('--effects')
|
||||
effect_paths = args[k + 1:k + 4]
|
||||
del args[k:k + 4]
|
||||
shield_armor_path = None
|
||||
if '--shield-armor' in args:
|
||||
k = args.index('--shield-armor')
|
||||
shield_armor_path = args[k + 1]
|
||||
del args[k:k + 2]
|
||||
first_effect_id = 9910001
|
||||
if '--first-effect-id' in args:
|
||||
k = args.index('--first-effect-id')
|
||||
first_effect_id = int(args[k + 1])
|
||||
del args[k:k + 2]
|
||||
if args[0] == '--validate':
|
||||
validate(Converter(*args[1:4], effect_paths=effect_paths))
|
||||
validate(Converter(*args[1:4], effect_paths=effect_paths, shield_armor_path=shield_armor_path))
|
||||
return
|
||||
sparse, rpp, vmdb, ids_file, out, first, first_unique = args[0:7]
|
||||
build = int(args[7]) if len(args) > 7 else 70532
|
||||
ids = [int(x) for x in open(ids_file).read().split() if x.strip()]
|
||||
generate(Converter(sparse, rpp, vmdb, effect_paths), ids, out, int(first), int(first_unique), build, first_effect_id)
|
||||
generate(Converter(sparse, rpp, vmdb, effect_paths, shield_armor_path), ids, out, int(first), int(first_unique), build, first_effect_id)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -75,6 +75,16 @@ def read_randproppoints(path):
|
||||
return {k: {'Epic': f(v[4]), 'Superior': f(v[5]), 'Good': f(v[6])} for k, v in rows.items()}
|
||||
|
||||
|
||||
def read_armor_shield(path):
|
||||
"""{item level: [7 floats]} from ItemArmorShield.db2: the shield armor per quality (index 0 poor .. 6 heirloom)."""
|
||||
import os, sys
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'vmangos_loot'))
|
||||
import wdc5
|
||||
rows, _ = wdc5.read(path)
|
||||
# the reader packs the Quality float array into one integer, little endian; the second field is ItemLevel
|
||||
return {level: list(struct.unpack('<7f', packed.to_bytes(28, 'little'))) for packed, level in rows.values()}
|
||||
|
||||
|
||||
def read_spell_auras(path):
|
||||
"""{spell id: {aura type}} of the apply aura effects (Effect 6) in SpellEffect.db2."""
|
||||
import os, sys
|
||||
|
||||
Reference in New Issue
Block a user