mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
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:
parent
b9a1b0244b
commit
587c0ef60d
8 changed files with 194 additions and 147 deletions
|
|
@ -1722,6 +1722,7 @@ public:
|
|||
|
||||
// Combo points
|
||||
uint8_t getComboPoints() const { return comboPoints_; }
|
||||
uint8_t getShapeshiftFormId() const { return shapeshiftFormId_; }
|
||||
uint64_t getComboTarget() const { return comboTarget_; }
|
||||
|
||||
// Death Knight rune state (6 runes: 0-1=Blood, 2-3=Unholy, 4-5=Frost; may become Death=3)
|
||||
|
|
@ -2995,6 +2996,8 @@ private:
|
|||
// Mirror timers (0=fatigue, 1=breath, 2=feigndeath)
|
||||
MirrorTimer mirrorTimers_[3];
|
||||
|
||||
// Shapeshift form (from UNIT_FIELD_BYTES_1 byte 3)
|
||||
uint8_t shapeshiftFormId_ = 0;
|
||||
// Combo points (rogues/druids)
|
||||
uint8_t comboPoints_ = 0;
|
||||
uint64_t comboTarget_ = 0;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue