Getting a buff doesnt throw error now

This commit is contained in:
Logan Payton
2018-05-16 12:02:22 -04:00
parent 45543bdcdb
commit 155bc1c429
2 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ local function createAuraIcon(element, index)
local button = CreateFrame('Button', '$parentButton' .. index, element)
button:RegisterForClicks('RightButtonUp')
local cd = CreateFrame('Cooldown', '$parentCooldown', button, 'oUF_CooldownFrameTemplate')
local cd = CreateFrame('Frame', '$parentCooldown', button, 'oUF_CooldownFrameTemplate')
cd:SetAllPoints()
local icon = button:CreateTexture(nil, 'BORDER')
@@ -189,7 +189,7 @@ local function updateIcon(element, unit, index, offset, filter, isDebuff, visibl
-- complicated.
if button.cd and not element.disableCooldown then
if duration and duration > 0 then
button.cd:SetCooldown(GetTime() - (duration - expiration), duration)
-- button.cd:SetCooldown(GetTime() - (duration - expiration), duration)
button.cd:Show()
else
button.cd:Hide()