View Single Post
08-10-14, 12:53 PM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,335
UNIT_SPELLCAST_START and UNIT_SPELLCAST_CHANNEL_START aren't returning the values that are nil. Those are from UnitCastingInfo(). The code doesn't check if the event firing is for the player while it only runs for the player castbar. So it's asking UnitCastingInfo() to check the player when the target starts casting.



I would suggest replacing this line to be a little more robust:
Code:
if (self.unit~="player") then return end
-with-
Code:
if not UnitIsUnit(self.unit,"player") or not UnitIsUnit(unit,"player") then return; end
This will also proc on other bars if the unit happens to be pointing to the player (like target if you're targeting yourself).

Alternate:
Code:
if self.unit~="player" or not UnitIsUnit(self.unit,unit) then return; end
This will still restrict to the player castbar, but still checks if the event is firing for it.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 08-10-14 at 12:58 PM.
  Reply With Quote