mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Getting a buff doesnt throw error now
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user