View Single Post
02-11-15, 09:51 PM   #2
sticklord
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 57
Try this:
Lua Code:
  1. local t=CreateFrame("FRAME")
  2. t:SetPoint("RIGHT",TargetFrame,12,12)
  3. t:SetSize(30,30)
  4. t.c=CreateFrame("Cooldown","cd1")
  5. t.c:SetAllPoints(t)
  6. t.t=t:CreateTexture(nil,"BORDER")
  7. t.t:SetAllPoints()
  8. t.t:SetTexture("Interface\\Icons\\spell_holy_divinepurpose")
  9. t:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  10. t:Hide()
  11.  
  12. t:SetScript("OnEvent", function(...)
  13. local b,_,_,e,_,_,_,_,_,_,l = select(4, ...)
  14. if (e == UnitName("Player") and (b=="SPELL_AURA_REMOVED")and l==126705)
  15. then t:Show() CooldownFrame_SetTimer(cd1,GetTime(),45,1)
  16. C_Timer.After(45, function() t:Hide() end)
  17. return
  18. end
  19. end)
  Reply With Quote