From 155bc1c429859a18f48bd36115cc3ca7dffb9fc5 Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Wed, 16 May 2018 12:02:22 -0400 Subject: [PATCH] Getting a buff doesnt throw error now --- ElvUI/Libraries/oUF/elements/auras.lua | 4 ++-- ElvUI/Modules/UnitFrames/Elements/Auras.lua | 24 ++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ElvUI/Libraries/oUF/elements/auras.lua b/ElvUI/Libraries/oUF/elements/auras.lua index 30508e2..6b26298 100644 --- a/ElvUI/Libraries/oUF/elements/auras.lua +++ b/ElvUI/Libraries/oUF/elements/auras.lua @@ -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() diff --git a/ElvUI/Modules/UnitFrames/Elements/Auras.lua b/ElvUI/Modules/UnitFrames/Elements/Auras.lua index 4c514fa..94bea4c 100644 --- a/ElvUI/Modules/UnitFrames/Elements/Auras.lua +++ b/ElvUI/Modules/UnitFrames/Elements/Auras.lua @@ -53,27 +53,27 @@ function UF:Construct_AuraIcon(button) local offset = UF.thinBorders and E.mult or E.Border 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:SetTemplate("Default", nil, nil, UF.thinBorders, true) + E:SetTemplate(button, "Default", nil, nil, UF.thinBorders, true) button.cd.noOCC = true button.cd.noCooldownCount = true - button.cd:SetReverse(true) - button.cd:SetDrawEdge(true) - button.cd:SetInside(button, offset, offset) + -- button.cd:SetReverse(true) + -- button.cd:SetDrawEdge(true) + 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:SetDrawLayer("ARTWORK") button.count:ClearAllPoints() - button.count:Point("BOTTOMRIGHT", 1, 1) + E:Point(button.count, "BOTTOMRIGHT", 1, 1) button.count:SetJustifyH("RIGHT") button.overlay:SetTexture(nil) - button.stealable:SetTexture(nil) + -- button.stealable:SetTexture(nil) button:RegisterForClicks("RightButtonUp") button:SetScript("OnClick", function(self) @@ -334,8 +334,8 @@ function UF:UpdateAuraIconSettings(auras, noCycle) if not noCycle then while auras[index] do local button = auras[index] - button.text:FontTemplate(unitframeFont, db.fontSize, unitframeFontOutline) - button.count:FontTemplate(unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) + E:FontTemplate(button.text, unitframeFont, db.fontSize, unitframeFontOutline) + E:FontTemplate(button.count, unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) if db.clickThrough and button:IsMouseEnabled() then button:EnableMouse(false) @@ -345,8 +345,8 @@ function UF:UpdateAuraIconSettings(auras, noCycle) index = index + 1 end else - auras.text:FontTemplate(unitframeFont, db.fontSize, unitframeFontOutline) - auras.count:FontTemplate(unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) + E:FontTemplate(auras.text, unitframeFont, db.fontSize, unitframeFontOutline) + E:FontTemplate(auras.count, unitframeFont, db.countFontSize or db.fontSize, unitframeFontOutline) if db.clickThrough and auras:IsMouseEnabled() then auras:EnableMouse(false)