};
local watchedAuras;
local majorAuras;
+local majorMax;
local auraFilters = {"HELPFUL", "HARMFUL"};
local DEFAULT_ICON = "Interface\\AddOns\\OmaRF\\images\\rhomb";
local _;
return;
end
- local name, icon, count, debuff, expires, caster, id;
+ local name, icon, count, expires, caster, id;
local current = GetTime();
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);
+ name, _, icon, count, _, _, expires, caster, _, _, id = UnitAura(unit, i, filter);
if not id then break end
- local pos = watchedAuras[name] or watchedAuras[id] or watchedAuras[debuff];
+ local pos = watchedAuras[id] or watchedAuras[name];
if pos then
local ind = f[frameName][pos];
local config = OmaRF.db.profile.indicators[pos];
end
end
- if majorI <= majorMax and (majorAuras[id] or majorAuras[name]) then
+ if (majorAuras[id] or majorAuras[name]) and majorI <= majorMax then
local ind = majorFrames[frameName][majorI];
ind.icon:SetTexture(icon);
ind.icon:Show();
for _, aura in ipairs(self.db.profile.majorAuras["auras"]) do
majorAuras[aura] = true;
end
+ majorMax = OmaRF.db.profile.majorAuras["max"];
if next(watchedAuras) ~= nil or next(majorAuras) ~= nil then
self.running = true;
local prettyHealth;
if healthLost > 1200000000 then -- 1.2B
- local h1b = healthLost / 1000000000;
- local h100m = (healthLost % 1000000000) / 100000000;
- prettyHealth = format("-%d.%dB", h1b, h100m);
+ prettyHealth = format("-%.1fB", healthLost / 1000000000);
elseif healthLost > 1200000 then -- 1.2M
- prettyHealth = format("-%dM", healthLost / 1000000);
+ prettyHealth = format("-%.1fM", healthLost / 1000000);
elseif healthLost > 1000 then -- 1K
prettyHealth = format("-%dK", healthLost / 1000);
else