Originally Posted by Tim
Perhaps have the destination target checked to see if it's attackable/hostile with the initial spell cast?
|
Yeah, I've used that method as well.
Code:
if subEvent == "SPELL_CAST_SUCCESS" and (UnitCanAttack("player", "target") or UnitAffectingCombat("player")) then
But, this also had some issue.
1. Still tracks any spell casts as long as unit is attackable.
2. Only "target" is considered. Even if you have a target exists, but is not attackable and you cast a spell on "focus", "targettarget" then this won't work.
3. AOE is not considered as well.