best way to detect combat status as an event?
Hey guys. I'm trying to find the best way to determine if the player is in combat, and run a function based on that status.
Right now I'm using the event PLAYER_REGEN_ENABLED, but it only fires when the player has agro. This wouldn't work for, say, dps or a healer entering combat, but not being attacked themselves.
Elsewhere I'm using UnitAffectingCombat("player") as a condition for an if statement, but it's not a great solution either as it's buried in an OnEnter hook, so it only checks when the mouse hovers on that frame.
Thanks,
Tony
|