Files
WoWee/Data/expansions/turtle/update_fields.json
Kelsi 99f73b6ffa fix(update-fields): correct UNIT_NPC_EMOTESTATE across all four expansions
UNIT_NPC_EMOTESTATE is read in entity_controller.cpp:551 for stationary
NPC looping animations (sleeping, talking, working, etc.) and in
animation_callback_handler.cpp:323.

- classic, turtle, tbc: field was missing entirely — fieldIndex() was
  returning the 0xFFFF sentinel, so NPC idle emote animations never
  played on those expansions.
- wotlk: field was set to 164, which is past UNIT_END (148) — that
  index falls inside the PLAYER_ range, so reading it would have
  pulled an unrelated player-fields value rather than the unit emote
  state.

Authoritative sources:
  Vanilla 1.12:  148   (vmangos UpdateFields_1_12_1.h:93,
                       OBJECT_END + 0x8E)
  TBC 2.4.3:     169   (cmangos mangos-tbc UpdateFields.h:118,
                       OBJECT_END + 0xA3)
  WotLK 3.3.5a:  83    (TrinityCore 3.3.5 UpdateFields.h:140,
                       OBJECT_END + 0x4D — adjacent to UNIT_NPC_FLAGS=82)

Python collision check after patch: no UNIT_* aliasing in any file.
2026-05-15 01:15:03 -07:00

53 lines
1.5 KiB
JSON

{
"CONTAINER_FIELD_NUM_SLOTS": 48,
"CONTAINER_FIELD_SLOT_1": 50,
"GAMEOBJECT_DISPLAYID": 8,
"GAMEOBJECT_BYTES_1": 14,
"ITEM_FIELD_DURABILITY": 48,
"ITEM_FIELD_MAXDURABILITY": 49,
"ITEM_FIELD_STACK_COUNT": 14,
"OBJECT_FIELD_ENTRY": 3,
"OBJECT_FIELD_SCALE_X": 4,
"PLAYER_BYTES": 191,
"PLAYER_BYTES_2": 192,
"PLAYER_END": 1282,
"PLAYER_EXPLORED_ZONES_START": 1111,
"PLAYER_FIELD_BANKBAG_SLOT_1": 612,
"PLAYER_FIELD_BANK_SLOT_1": 564,
"PLAYER_FIELD_COINAGE": 1176,
"PLAYER_FIELD_INV_SLOT_HEAD": 486,
"PLAYER_FIELD_PACK_SLOT_1": 532,
"PLAYER_FLAGS": 190,
"PLAYER_NEXT_LEVEL_XP": 717,
"PLAYER_QUEST_LOG_START": 198,
"PLAYER_REST_STATE_EXPERIENCE": 1175,
"PLAYER_SKILL_INFO_START": 718,
"PLAYER_XP": 716,
"UNIT_DYNAMIC_FLAGS": 143,
"UNIT_END": 188,
"UNIT_FIELD_AURAFLAGS": 98,
"UNIT_FIELD_AURAS": 50,
"UNIT_FIELD_BYTES_0": 36,
"UNIT_FIELD_BYTES_1": 138,
"UNIT_FIELD_DISPLAYID": 131,
"UNIT_FIELD_FACTIONTEMPLATE": 35,
"UNIT_FIELD_FLAGS": 46,
"UNIT_FIELD_HEALTH": 22,
"UNIT_FIELD_LEVEL": 34,
"UNIT_FIELD_MAXHEALTH": 28,
"UNIT_FIELD_MAXPOWER1": 29,
"UNIT_FIELD_MOUNTDISPLAYID": 133,
"UNIT_FIELD_NATIVEDISPLAYID": 132,
"UNIT_FIELD_POWER1": 23,
"UNIT_FIELD_RESISTANCES": 155,
"UNIT_FIELD_STAT0": 150,
"UNIT_FIELD_STAT1": 151,
"UNIT_FIELD_STAT2": 152,
"UNIT_FIELD_STAT3": 153,
"UNIT_FIELD_STAT4": 154,
"UNIT_FIELD_TARGET_HI": 17,
"UNIT_FIELD_TARGET_LO": 16,
"UNIT_NPC_EMOTESTATE": 148,
"UNIT_NPC_FLAGS": 147
}