Originally Posted by Phanx
There's no reason to check UnitIsUnit here. If you're targeting yourself and cast a spell, then you'll get two events for the same spellcast -- one for the "player" unit, and one for the "target" unit. In this case, though, you only want to run your function once per spellcast (since you're not modifying the target castbar too) so you should just ignore the event for the "target" unit.
Code:
if unit ~= "player" or unit ~= self.unit then return end
|
Had a brain fart as I was in a hurry to leave, that is what I was trying to point out. And yes, in my haste I used AND instead of OR.