Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(allstates, event, ...)
- aura_env.allstates = allstates
- local timestamp, subevent, _, sourceGUID = ...
- local destGUID = select(8, ...)
- local destName = select(9, ...)
- local spellID = select(12, ...)
- if event == "COMBAT_LOG_EVENT_UNFILTERED"
- then
- local npcID = select(6, strsplit('-', destGUID))
- if (subevent == "SPELL_AURA_APPLIED"
- or subevent == "SPELL_AURA_REFRESH")
- and sourceGUID == UnitGUID("player")
- and aura_env.spells[spellID]
- and tonumber(npcID) == 103679
- then
- local unitID = UnitGUID("target") == destGUID and "target"
- or UnitGUID("focus") == destGUID and "focus"
- or UnitGUID("mouseover") == destGUID and "mouseover"
- or UnitGUID("targettarget") == destGUID and "targettarget"
- if UnitExists(unitID) then
- local name, _, icon, _, _, duration, expires = UnitDebuff(unitID, GetSpellInfo(spellID), nil, "PLAYER")
- aura_env.TSU(allstates, spellID, name, "timed", duration, expires,0, icon, nil, spellID)
- end
- end
- if subevent == "SPELL_CAST_SUCCESS"
- and sourceGUID == UnitGUID("player")
- and spellID == 980
- and tonumber(npcID) == 103679
- and allstates[980]
- then
- aura_env.agony = destGUID
- end
- if subevent == "SPELL_SUMMON"
- and sourceGUID == UnitGUID("player")
- and spellID == 205178
- then
- aura_env.clearTSU(allstates)
- end
- end
- if event == "UNIT_AURA"
- and UnitGUID(...) == aura_env.agony
- then
- local unitID, _ = ...
- if UnitExists(unitID) then
- local name, _, icon, _, _, duration, expires = UnitDebuff(unitID, GetSpellInfo(980), nil, "PLAYER")
- aura_env.TSU(allstates, 980, name, "timed", duration, expires,0, icon, nil, 980)
- aura_env.agony = nil
- end
- end
- if event == "PLAYER_TOTEM_UPDATE"
- and not GetTotemInfo(4)
- then
- aura_env.clearTSU(allstates)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement