We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1824858 commit 454da62Copy full SHA for 454da62
Interface/AddOns/nPower/core.lua
@@ -10,12 +10,18 @@ end
10
11
local function CalcRuneCooldown(num)
12
local start, duration, runeReady = GetRuneCooldown(num)
13
+
14
+ -- Sometimes GetRuneCooldown returns nil for some reason.
15
+ if not start then
16
+ return
17
+ end
18
19
local time = floor(GetTime() - start)
20
local cooldown = ceil(duration - time)
21
- if (runeReady or UnitIsDeadOrGhost("player")) then
22
+ if runeReady or UnitIsDeadOrGhost("player") then
23
return "#"
- elseif (not UnitIsDeadOrGhost("player") and cooldown) then
24
+ elseif not UnitIsDeadOrGhost("player") and cooldown then
25
return cooldown
26
end
27
0 commit comments