Thread: UnitBuff help
View Single Post
05-12-14, 11:00 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
First of all, your event handler will never fire because it's on "indicatorframe" and you're registering UNIT_AURA events for everything except the frame with your actual event handler.

The frame you have SetScript('OnEvent') on is what you need to register the event for.

Secondly, nothing past your first if statement in the event handler is going to be called.

You're only watching one event, so there's no point in checking what event is being fired, and all of your else conditions are identical to the first condition, so if it's true it will never get to them.

Also, checking "if indicator1 == nil" then attempting to HIDE indicator1 will result in an error if that frame doesn't actually exist.

edit: Actually I just reread it and I guess you named the result of the UnitBuff function the same thing as your frames, which would half explain that part.

Last edited by semlar : 05-12-14 at 11:03 PM.
  Reply With Quote