X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/f92b14eeefa36413da849e95271c4180220d658c..c82178bdfc108f95b41c3d0ed88ffe26b834482f:/OmaRF/Indicators.lua diff --git a/OmaRF/Indicators.lua b/OmaRF/Indicators.lua index 77b4535..abd52ec 100644 --- a/OmaRF/Indicators.lua +++ b/OmaRF/Indicators.lua @@ -145,7 +145,7 @@ function M.UpdateAuras(frame, unit) local showInds, needUpdate = false, false; local i = 1; while true do - _, _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "PLAYER HELPFUL"); + _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "PLAYER HELPFUL"); if not id then break end local pos = watchedAuras[id]; if pos then @@ -177,19 +177,22 @@ function M.UpdateMajorAuras(frame, unit) for _, ind in pairs(frame.majors) do hideInd(ind); end - local icon, count, expires, id; + if UnitIsDeadOrGhost(unit) then return end + local name, icon, count, expires, id; local showMajors, needUpdate = false, false; local majorPos = 1; local alert = false; -- color the whole bar local current = GetTime(); local i = 1; while true do - _, _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "HARMFUL"); + name, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "HARMFUL"); if not id or majorPos > 3 then break end - local major = majorAuras[id]; + local major = majorAuras[id] or majorAuras[name]; if major then - needUpdate = showInd(frame.majors[majorPos], expires, current, count, icon) or needUpdate; - if major.bar then alert = true end + if not major.noicon then + needUpdate = showInd(frame.majors[majorPos], expires, current, count, icon) or needUpdate; + end + if major.bar then alert = major.bar end showMajors = true; majorPos = majorPos + 1; end