Trying to determine if the player is auto attacking for a few of the bubble mechanics in WoD, but the best I have is going off the last-swing event's destination guid.
Is there a way to know that the auto-attack 'spell' is toggled?
Trying to determine if the player is auto attacking for a few of the bubble mechanics in WoD, but the best I have is going off the last-swing event's destination guid.
Is there a way to know that the auto-attack 'spell' is toggled?
Maybe the PLAYER_ENTER_COMBAT and PLAYER_LEAVE_COMBAT events.
http://wowprogramming.com/docs/event...R_ENTER_COMBAT
http://wowprogramming.com/docs/event...R_LEAVE_COMBAT
Oh, that is a different way to think about it - need to test when they fire, but maybe something like:
If player is targeting a bubbled mob, last_swing_event hit that target and wow hasn't fired player_leave_combat since that last swing (or player_enter_combat fires while targeting bubble'd mob), then play big_scary_warning?
I wonder if that event fires when I tab between attacking different targets, need to get home and test.
Thanks!
IsCurrentSpell(spellID) may be what you are looking for. It is not documented but it will tell you if the spell is "active".
SpellID for Auto Attack as found on Wowhead is 6603.
oh that is perfect :-)
Did a quick test, can't find any problems.
Thanks!Code:/run print( IsCurrentSpell(6603))