mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
The character stats panel was showing Armor: 0 because summing armor from item query responses is fragile (depends on correct BuyCount/damage block parsing). Instead, read the server-authoritative total armor directly from UNIT_FIELD_RESISTANCES (physical resistance, index 0) in the player entity update fields. Added UNIT_FIELD_RESISTANCES to the UF enum and all four expansion JSON files with correct wire indices: WotLK 3.3.5a: 99 (NPC_FLAGS=82 + emotestate + stat×5 + posstat×5 + negstat×5) TBC 2.4.3: 185 (NPC_FLAGS=168 + same relative layout) Classic 1.12: 154 (NPC_FLAGS=147 + emotestate + stat×5, no posstat/negstat) Turtle WoW: 154 (same as Classic) Stats panel uses server armor when > 0, falls back to summed item-query armor otherwise. Armor rating resets to 0 on world entry and is updated from both CREATE_OBJECT and VALUES update blocks.
35 lines
981 B
JSON
35 lines
981 B
JSON
{
|
|
"OBJECT_FIELD_ENTRY": 3,
|
|
"UNIT_FIELD_TARGET_LO": 16,
|
|
"UNIT_FIELD_TARGET_HI": 17,
|
|
"UNIT_FIELD_BYTES_0": 36,
|
|
"UNIT_FIELD_HEALTH": 22,
|
|
"UNIT_FIELD_POWER1": 23,
|
|
"UNIT_FIELD_MAXHEALTH": 28,
|
|
"UNIT_FIELD_MAXPOWER1": 29,
|
|
"UNIT_FIELD_LEVEL": 34,
|
|
"UNIT_FIELD_FACTIONTEMPLATE": 35,
|
|
"UNIT_FIELD_FLAGS": 46,
|
|
"UNIT_FIELD_FLAGS_2": 47,
|
|
"UNIT_FIELD_DISPLAYID": 152,
|
|
"UNIT_FIELD_MOUNTDISPLAYID": 154,
|
|
"UNIT_NPC_FLAGS": 168,
|
|
"UNIT_DYNAMIC_FLAGS": 164,
|
|
"UNIT_FIELD_RESISTANCES": 185,
|
|
"UNIT_END": 234,
|
|
"PLAYER_FLAGS": 236,
|
|
"PLAYER_BYTES": 237,
|
|
"PLAYER_BYTES_2": 238,
|
|
"PLAYER_XP": 926,
|
|
"PLAYER_NEXT_LEVEL_XP": 927,
|
|
"PLAYER_FIELD_COINAGE": 1441,
|
|
"PLAYER_QUEST_LOG_START": 244,
|
|
"PLAYER_FIELD_INV_SLOT_HEAD": 650,
|
|
"PLAYER_FIELD_PACK_SLOT_1": 696,
|
|
"PLAYER_SKILL_INFO_START": 928,
|
|
"PLAYER_EXPLORED_ZONES_START": 1312,
|
|
"GAMEOBJECT_DISPLAYID": 8,
|
|
"ITEM_FIELD_STACK_COUNT": 14,
|
|
"CONTAINER_FIELD_NUM_SLOTS": 64,
|
|
"CONTAINER_FIELD_SLOT_1": 66
|
|
}
|