Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-25-23, 12:43 PM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 122
Ignoring global cooldown

Greetings,
I've created an icon that lights up when a spell is ready to use. Sometimes though, the icon blinks (disappears for a moment): I think it's a problem due to the global cooldown. I tried to work around this problem like this:

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.      end
  8. else --hide icon
  9. end

Is there a better method?

Last edited by Benalish : 08-25-23 at 02:07 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Ignoring global cooldown

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off