Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function( _, timestamp, subtype, _, sourceGUID, sourceName, _, _, destGUID, destName, _, _, spellID )
- WA_FlameShocks = WA_FlameShocks or {}
- WA_FSCount = WA_FSCount or 0
- WA_MyGUID = WA_MyGUID or UnitGUID('player')
- WA_ActiveEvents = WA_ActiveEvents or { SPELL_AURA_APPLIED = true,
- SPELL_AURA_REFRESH = true,
- SPELL_AURA_APPLIED_DOSE = true,
- SPELL_PERIODIC_DAMAGE = true,
- SPELL_PERIODIC_MISSED = true,
- SPELL_DAMAGE = true}
- WA_InactiveEvents = WA_InactiveEvents or { SPELL_AURA_REMOVED = true,
- SPELL_AURA_BROKEN = true,
- SPELL_AURA_BROKEN_SPELL = true }
- WA_DeathEvents = WA_DeathEvents or { UNIT_DIED = true,
- UNIT_DESTROYED = true }
- local now = GetTime()
- if WA_DeathEvents[ subtype ] then
- if WA_FlameShocks[ destGUID ] then
- WA_FSCount = WA_FSCount - 1
- WA_FlameShocks[ destGUID ] = nil
- end
- elseif sourceGUID == WA_MyGUID and spellID == 217694 then
- if WA_ActiveEvents[ subtype ] then
- if not WA_FlameShocks[ destGUID ] then WA_FSCount = WA_FSCount + 1 end
- WA_FlameShocks[ destGUID ] = now
- elseif WA_InactiveEvents[ subtype ] then
- if WA_FlameShocks[ destGUID ] then
- WA_FSCount = WA_FSCount - 1
- WA_FlameShocks[ destGUID ] = nil
- end
- end
- end
- WA_FlameShockAuditor = WA_FlameShockAuditor or now
- if now - WA_FlameShockAuditor >= 2.5 then
- for i, last in pairs( WA_FlameShocks ) do
- if now - last >= 5 then
- WA_FlameShocks[ i ] = nil
- WA_FSCount = WA_FSCount - 1
- end
- end
- end
- return WA_FSCount >= 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement