- local majorI = 1;
- local majorMax = OmaRF.db.profile.majorAuras["max"];
- for _, filter in ipairs(auraFilters) do
- local i = 1;
- while true do
- name, _, icon, count, debuff, _, expires, caster, _, _, id = UnitAura(unit, i, filter);
- if not id then break end
- local pos = watchedAuras[name] or watchedAuras[id] or watchedAuras[debuff];
- 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.showIcon then
- -- show icon
- if config.useDefaultIcon then
- ind.icon:SetTexture(DEFAULT_ICON);
- else
- ind.icon:SetTexture(icon);
- end
- ind.icon:Show()
- end
- if config.showText then
- -- show text
- ind.text:SetText(remaining(expires, current));
- ind.text:Show();
- end
- end
- end
-
- if majorI <= majorMax and (majorAuras[id] or majorAuras[name]) then
- local ind = majorFrames[frameName][majorI];
- ind.icon:SetTexture(icon);
- ind.icon:Show();
- ind.expire:SetText(remaining(expires, current));
- ind.expire:Show();
- if count > 1 then
- ind.stack:SetText(count);
- ind.stack:Show();
- end
- majorI = majorI + 1;
- end
- i = i + 1;
+ for _, ind in pairs(frame.inds) do
+ if ind.text and ind.text.expires ~= nil then
+ needUpdate = remaining(ind.text, ind.text.expires, current) or needUpdate;
+ end
+ end
+ for _, ind in pairs(frame.majors) do
+ if ind.text and ind.text.expires ~= nil then
+ needUpdate = remaining(ind.text, ind.text.expires, current) or needUpdate;