+-- update current auras
+hooksecurefunc("CompactUnitFrame_UpdateAuras", function(frame)
+ local frameName = frame:GetName();
+ if f[frameName] then
+ for _, ind in pairs(f[frameName]) do ind.expires = nil end
+ for _, ind in ipairs(majorFrames[frameName]) do ind.expires = nil end
+
+ local name, icon, count, expires, caster, id;
+ local unit = frame.displayedUnit;
+ local majorI = 1;
+ for _, filter in ipairs(auraFilters) do
+ local i = 1;
+ while true do
+ name, _, icon, count, _, _, expires, caster, _, _, id = UnitAura(unit, i, filter);
+ if not id then break end
+ local pos = watchedAuras[id] or watchedAuras[name];
+ if pos then
+ local ind = f[frameName][pos];
+ local config = OmaRF.db.profile.indicators[pos];
+ if not config.mine or UnitIsPlayer(caster) then
+ if config.useDefaultIcon then
+ ind.icon:SetTexture(DEFAULT_ICON);
+ else
+ ind.icon:SetTexture(icon);
+ end
+ ind.expires = expires;
+ end
+ end
+
+ if (majorAuras[id] or majorAuras[name]) and majorI <= majorMax then
+ local ind = majorFrames[frameName][majorI];
+ ind.icon:SetTexture(icon);
+ ind.expires = expires;
+ if count > 1 then
+ ind.stackText:SetText(count);
+ end
+ majorI = majorI + 1;
+ end
+ i = i + 1;
+ end
+ end
+ end
+end);