From: Aleksi Blinnikka Date: Mon, 26 Mar 2018 10:04:24 +0000 (+0300) Subject: Only go through auras once X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/e90f2ac0721c80f251ba1a019e98f0a183a245c6 Only go through auras once --- diff --git a/OmaAB/ActionBars.lua b/OmaAB/ActionBars.lua index 10cd415..02bdcb9 100644 --- a/OmaAB/ActionBars.lua +++ b/OmaAB/ActionBars.lua @@ -663,7 +663,6 @@ local events = { end end, ["PLAYER_LOGIN"] = function() - GameTooltip = _G["GameTooltip"]; initialize(); end, ["ADDON_LOADED"] = function(addon) diff --git a/OmaRF/Events.lua b/OmaRF/Events.lua index 94dd14f..762cb99 100644 --- a/OmaRF/Events.lua +++ b/OmaRF/Events.lua @@ -98,7 +98,7 @@ local function updateHealth(frame, unit) frame.health:Show(); elseif current <= 0 or UnitIsDeadOrGhost(unit) then frame.health:Hide(); - updateText(frame, unit); -- update death + return updateText(frame, unit); -- update death else local w = current/max*width; frame.health:SetWidth(w); @@ -349,5 +349,5 @@ eventFuncs["PLAYER_ENTERING_WORLD"] = eventFuncs["UPDATE_ALL_BARS"]; eventFuncs["PLAYER_FOCUS_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"]; function M.UnitEvent(self, event) - eventFuncs[event](self); + return eventFuncs[event](self); end diff --git a/OmaUF/Auras.lua b/OmaUF/Auras.lua index 0341a4d..172e3d4 100644 --- a/OmaUF/Auras.lua +++ b/OmaUF/Auras.lua @@ -78,10 +78,6 @@ end function M.UpdateAuras(frame, unit) local auras = frame.auras; - for _, aura in ipairs(auras) do - if not aura:IsShown() then break end - aura:Hide(); - end local icon, count, duration, expires, caster, id; local pos = 1; for _, filter in ipairs(auraFilters) do @@ -110,4 +106,10 @@ function M.UpdateAuras(frame, unit) i = i + 1; end end + + while auras[pos] do + if not auras[pos]:IsShown() then return end + auras[pos]:Hide(); + pos = pos + 1; + end end diff --git a/OmaUF/Events.lua b/OmaUF/Events.lua index 9a06947..28b8672 100644 --- a/OmaUF/Events.lua +++ b/OmaUF/Events.lua @@ -438,5 +438,5 @@ eventFuncs["INSTANCE_ENCOUNTER_ENGAGE_UNIT"] = eventFuncs["UPDATE_ALL_BARS"]; eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"]; function M.UnitEvent(self, event, arg1) - eventFuncs[event](self, arg1); + return eventFuncs[event](self, arg1); end