Skip to content

Commit

Permalink
why
Browse files Browse the repository at this point in the history
fix global leak
  • Loading branch information
Loaal committed Dec 27, 2017
1 parent 53e8869 commit a0b25c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ElvUI/modules/nameplates/elements/healthBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ function mod:ConstructElement_HealthBar(parent)
self:StyleFrame(frame)

frame:SetScript("OnSizeChanged", function(self, width)
local health = self:GetValue()
local _, maxHealth = self:GetMinMaxValues()
if self:GetStatusBarTexture() then
local health = self:GetValue()
local _, maxHealth = self:GetMinMaxValues()
self:GetStatusBarTexture():SetPoint("TOPRIGHT", -(width * ((maxHealth - health) / maxHealth)), 0)
end
end)
Expand Down
11 changes: 4 additions & 7 deletions ElvUI/modules/unitframes/unitframes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -898,15 +898,12 @@ function UF:RegisterRaidDebuffIndicator()
if ORD then
ORD:ResetDebuffData()

local instance = E.global.unitframe.raidDebuffIndicator.instanceFilter
local other = E.global.unitframe.raidDebuffIndicator.otherFilter
instanceSpells = ((E.global.unitframe.aurafilters[instance] and E.global.unitframe.aurafilters[instance].spells) or E.global.unitframe.aurafilters.RaidDebuffs.spells)
otherSpells = ((E.global.unitframe.aurafilters[other] and E.global.unitframe.aurafilters[other].spells) or E.global.unitframe.aurafilters.CCDebuffs.spells)

if instanceType == "party" or instanceType == "raid" then
ORD:RegisterDebuffs(instanceSpells)
local instance = E.global.unitframe.raidDebuffIndicator.instanceFilter
ORD:RegisterDebuffs(E.global.unitframe.aurafilters[instance] and E.global.unitframe.aurafilters[instance].spells or E.global.unitframe.aurafilters.RaidDebuffs.spells)
else
ORD:RegisterDebuffs(otherSpells)
local other = E.global.unitframe.raidDebuffIndicator.otherFilter
ORD:RegisterDebuffs(E.global.unitframe.aurafilters[other] and E.global.unitframe.aurafilters[other].spells or E.global.unitframe.aurafilters.CCDebuffs.spells)
end
end
end
Expand Down

0 comments on commit a0b25c7

Please sign in to comment.