Thread: ShowOverlayGlow
View Single Post
11-23-12, 09:16 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Thumbs up for trying!

Thing is you are looking out for a buff application, and you have a event for that that you can use (much better than having a OnUpdate script, because that runs each frame, not very necessary).

You need the event UNIT_AURA, a frame to work with and since this is a UNIT_* event we can use RegisterUnitEvent.

Code:
local f = CreateFrame("Frame")
f:RegisterUnitEvent("UNIT_AURA", "player")
f:SetScript("OnEvent", function()
  if UnitBuff("player", "Molten Armor") then
    ActionButton_ShowOverlayGlow(ActionButton1)
  else
    ActionButton_HideOverlayGlow(ActionButton1)
  end
end)
ActionButton1 is only for the default action bar, if you use an addon then you need to /fstack and find the frame name of your button.
__________________
Profile: Curse | Wowhead
  Reply With Quote