feat: track shapeshift form and fire UPDATE_SHAPESHIFT_FORM events

Add UNIT_FIELD_BYTES_1 to all expansion update field tables (Classic=133,
TBC/WotLK=137). Byte 3 of this field contains the shapeshift form ID
(Bear=1, Cat=3, Travel=4, Moonkin=31, Tree=36, Battle Stance=17, etc.).

Track form changes in the VALUES update handler and fire
UPDATE_SHAPESHIFT_FORM + UPDATE_SHAPESHIFT_FORMS events when the
form changes. This enables stance bar addons and druid form tracking.

New Lua functions:
- GetShapeshiftForm() — returns current form ID (0 = no form)
- GetNumShapeshiftForms() — returns form count by class (Warrior=3,
  Druid=6, DK=3, Rogue=1, Priest=1, Paladin=3)
This commit is contained in:
Kelsi 2026-03-22 22:12:17 -07:00
parent b9a1b0244b
commit 587c0ef60d
8 changed files with 194 additions and 147 deletions

View file

@ -20,6 +20,7 @@ enum class UF : uint16_t {
UNIT_FIELD_TARGET_LO,
UNIT_FIELD_TARGET_HI,
UNIT_FIELD_BYTES_0,
UNIT_FIELD_BYTES_1, // byte3 = shapeshift form ID
UNIT_FIELD_HEALTH,
UNIT_FIELD_POWER1,
UNIT_FIELD_MAXHEALTH,