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) local button = CreateFrame('Button', '$parentButton' .. index, element)
button:RegisterForClicks('RightButtonUp') button:RegisterForClicks('RightButtonUp')
local cd = CreateFrame('Cooldown', '$parentCooldown', button, 'oUF_CooldownFrameTemplate') local cd = CreateFrame('Frame', '$parentCooldown', button, 'oUF_CooldownFrameTemplate')
cd:SetAllPoints() cd:SetAllPoints()
local icon = button:CreateTexture(nil, 'BORDER') local icon = button:CreateTexture(nil, 'BORDER')
@@ -189,7 +189,7 @@ local function updateIcon(element, unit, index, offset, filter, isDebuff, visibl
-- complicated. -- complicated.
if button.cd and not element.disableCooldown then if button.cd and not element.disableCooldown then
if duration and duration > 0 then if duration and duration > 0 then
button.cd:SetCooldown(GetTime() - (duration - expiration), duration) -- button.cd:SetCooldown(GetTime() - (duration - expiration), duration)
button.cd:Show() button.cd:Show()
else else
button.cd:Hide() button.cd:Hide()
+12 -12
View File
@@ -53,27 +53,27 @@ function UF:Construct_AuraIcon(button)
local offset = UF.thinBorders and E.mult or E.Border local offset = UF.thinBorders and E.mult or E.Border
button.text = button.cd:CreateFontString(nil, "OVERLAY") button.text = button.cd:CreateFontString(nil, "OVERLAY")
button.text:Point("CENTER", 1, 1) E:Point(button.text, "CENTER", 1, 1)
button.text:SetJustifyH("CENTER") button.text:SetJustifyH("CENTER")
button:SetTemplate("Default", nil, nil, UF.thinBorders, true) E:SetTemplate(button, "Default", nil, nil, UF.thinBorders, true)
button.cd.noOCC = true button.cd.noOCC = true
button.cd.noCooldownCount = true button.cd.noCooldownCount = true
button.cd:SetReverse(true) -- button.cd:SetReverse(true)
button.cd:SetDrawEdge(true) -- button.cd:SetDrawEdge(true)
button.cd:SetInside(button, offset, offset) E:SetInside(button.cd, button, offset, offset)
button.icon:SetInside(button, offset, offset) E:SetInside(button.icon, button, offset, offset)
button.icon:SetTexCoord(unpack(E.TexCoords)) button.icon:SetTexCoord(unpack(E.TexCoords))
button.icon:SetDrawLayer("ARTWORK") button.icon:SetDrawLayer("ARTWORK")
button.count:ClearAllPoints() button.count:ClearAllPoints()
button.count:Point("BOTTOMRIGHT", 1, 1) E:Point(button.count, "BOTTOMRIGHT", 1, 1)
button.count:SetJustifyH("RIGHT") button.count:SetJustifyH("RIGHT")
button.overlay:SetTexture(nil) button.overlay:SetTexture(nil)
button.stealable:SetTexture(nil) -- button.stealable:SetTexture(nil)
button:RegisterForClicks("RightButtonUp") button:RegisterForClicks("RightButtonUp")
button:SetScript("OnClick", function(self) button:SetScript("OnClick", function(self)
@@ -334,8 +334,8 @@ function UF:UpdateAuraIconSettings(auras, noCycle)
if not noCycle then if not noCycle then
while auras[index] do while auras[index] do
local button = auras[index] local button = auras[index]
button.text:FontTemplate(unitframeFont, db.fontSize, unitframeFontOutline) E:FontTemplate(button.text, unitframeFont, db.fontSize, unitframeFontOutline)
button.count:FontTemplate(unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) E:FontTemplate(button.count, unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline)
if db.clickThrough and button:IsMouseEnabled() then if db.clickThrough and button:IsMouseEnabled() then
button:EnableMouse(false) button:EnableMouse(false)
@@ -345,8 +345,8 @@ function UF:UpdateAuraIconSettings(auras, noCycle)
index = index + 1 index = index + 1
end end
else else
auras.text:FontTemplate(unitframeFont, db.fontSize, unitframeFontOutline) E:FontTemplate(auras.text, unitframeFont, db.fontSize, unitframeFontOutline)
auras.count:FontTemplate(unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) E:FontTemplate(auras.count, unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline)
if db.clickThrough and auras:IsMouseEnabled() then if db.clickThrough and auras:IsMouseEnabled() then
auras:EnableMouse(false) auras:EnableMouse(false)