View Single Post
09-08-23, 11:08 AM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,906
Maybe something along the lines of:

Lua Code:
  1. local usable, _ = IsUsableSpell(spellName)
  2. local start, duration = GetSpellCooldown(spellName)
  3. local ignore, gcd = GetSpellCooldown(61304)
  4. if (usable) then
  5.      if (duration == 0 and (start < ignore)) or (duration <= gcd) then --ignore global cooldown
  6.           --show icon
  7.           Frame.endTime = start + duration
  8.      end
  9. else
  10.       if not Frame.endTime or Frame.endTime <= GetTime() then
  11.           Frame:Hide() -- only if it's not still ticking
  12.       end
  13. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote