end
end,
["PLAYER_LOGIN"] = function()
- GameTooltip = _G["GameTooltip"];
initialize();
end,
["ADDON_LOADED"] = function(addon)
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);
eventFuncs["PLAYER_FOCUS_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
function M.UnitEvent(self, event)
- eventFuncs[event](self);
+ return eventFuncs[event](self);
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
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
eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
function M.UnitEvent(self, event, arg1)
- eventFuncs[event](self, arg1);
+ return eventFuncs[event](self, arg1);
end