Originally Posted by Xrystal
Lua Code:
for i=1,40 do local name, icon, count, type, maxTime, endTime, caster, isStealable = UnitAura( unit_id, i, filter ); if name then local startTime = GetTime(); local timeLeft = endTime - startTime local timeBufferImminent = 10 local timeBufferSoon = 60 C_Timer.After(timeLeft - timeBufferImminent,function() AuraExpireImminent(unit_id,name,i) end) C_Timer.After(timeLeft - timeBufferSoon,function() AuraExpireSoon(unit_id, name,i) end) end end
I've added name in there in case there is a glitch and aura i is no longer aura name. How that would occur I don't know. How much of the aura system is accessible I don't know myself either. I recall limits on only seeing your own auras on other players or npcs. But not sure if that was Classic or Retail.
|
name will be
nil when you run out of buffs in your scanning. For example, you're scanning for 40 buffs, but only have 3, when you scan for buff #4, it'll return
nil because there is no buff #4.