Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- aura_env.update = function(overrideInterval)
- if not (overrideInterval or GetTime() - aura_env.lastCheck >= aura_env.config.interval) then
- return
- end
- aura_env.lastCheck = GetTime();
- if not aura_env.iconsInitialized then
- aura_env.initIcons();
- end
- local group;
- if IsInRaid() then
- group = "raid"
- elseif IsInGroup() then
- group = "party"
- else
- group = "player"
- end
- local groupSize = max(1, GetNumGroupMembers())
- aura_env.needsBuff = {};
- for i=1,#aura_env.spells do
- local spell = aura_env.spells[i];
- aura_env.needsBuff[spell] = {};
- end
- for unitId in WA_IterateGroupMembers() do
- if UnitIsFriend("player", unitId) and not UnitIsDeadOrGhost(unitId) and UnitIsConnected(unitId) then
- for i=1,#aura_env.spells do
- local spell = aura_env.spells[i];
- if IsSpellInRange(spell, unitId) == 1 then
- if not WA_GetUnitAura(unitId, spell) then
- --print(unitId.." missing "..spell)
- local name = UnitName(unitId);
- table.insert(aura_env.needsBuff[spell], name);
- else
- --print(unitId.." has "..spell)
- end
- end
- end
- end
- end
- --DevTools_Dump(aura_env.needsBuff)
- WeakAuras.ScanEvents("RAID_BUFF_TSU");
- --print("updated")
- end
Advertisement
Add Comment
Please, Sign In to add comment