The CastSpell and UseAction hooks were doing too much work (tooltip
manipulation, spell name detection, combo point tracking) which was
interfering with WoW's action bar icon updates.
Solution:
Made both hooks minimal pass-throughs that just call and return the
original function. Combo point tracking is now handled entirely by:
1. UpdateComboPoints() - runs continuously via OnUpdate, captures
combo points as they're generated and stores in lastComboPoints
2. SPELLCAST_START event - fires for ALL spell casts regardless of
source (spellbook, action bar, macro, keybind) and calls
TrackComboPointCast()
3. TrackComboPointCast() - uses GetComboPoints() first, falls back
to lastComboPoints if points are already consumed
This approach works for all casting methods:
- Spellbook clicks
- Action bar clicks
- Keybinds
- Macros with /cast
- Macros with conditionals
And doesn't interfere with action bar icon updates (GCD, range
coloring, queue glowing, etc).
Previously, action button state functions (IsCurrentAction, IsActionInRange,
IsUsableAction, ActionHasRange, GetActionCount, IsConsumableAction) only
checked the active action, not the tooltip action. This caused issues when
using #showtooltip without conditionals, or when no conditionals matched:
- No glow on buttons even when the ability was queued/active
- Incorrect range/usability indicators
- Missing item counts for consumables
Now all these functions use the same priority as GetActionTexture and
GetActionCooldown: check the active action first, then fall back to the
tooltip action. This ensures button states match the displayed icon.
Fixes issues with abilities like Cleave and Heroic Strike not showing glow
when queued, and ensures all action button visuals are consistent.
When #showtooltip had an argument with conditionals (e.g., #showtooltip [stance:1] Fireball),
the code was trying to find a spell named "[stance:1] Fireball" which doesn't exist.
This resulted in no texture being found for the tooltip action, causing incorrect icons.
Now the code parses the argument first using GetParsedMsg() to extract just the spell name
before creating the tooltip action info. This allows it to properly find the spell in the
spellbook and retrieve its correct texture/icon.