View Single Post
12-25-19, 08:24 AM   #4
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Fizzlemizz View Post
In my rune code I check that start has been given a value (Blizzard does also in their UpdateRunes function which probably means GetRuneCooldown can return nil for start no matter what the online docs say) so a change to something like:

Lua Code:
  1. local function CalcRuneCooldown(self)
  2.     local cooldown
  3.     local start, duration, runeReady = GetRuneCooldown(self)
  4.     if start then
  5.         local time = floor(GetTime() - start)
  6.         cooldown = ceil(duration - time)
  7.     end    
  8.     if (runeReady or UnitIsDeadOrGhost("player")) then
  9.         return "#"
  10.     elseif (not UnitIsDeadOrGhost("player") and cooldown) then
  11.         return cooldown
  12.     end
Thank You @Fizzlemizz it works perfectly, it so nice not hearing the "fatality" every time the screen loads.
  Reply With Quote