WoWInterface - View Single Post - [Retail] nPower not updated need help with error code.
View Single Post
12-24-19, 01:37 PM   #2
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,439
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
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-24-19 at 07:50 PM.
  Reply With Quote