Advertisement
Botis

Untitled

Apr 2nd, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. function(allstates, event, ...)
  2. aura_env.allstates = allstates
  3.  
  4. local timestamp, subevent, _, sourceGUID = ...
  5. local destGUID = select(8, ...)
  6. local destName = select(9, ...)
  7. local spellID = select(12, ...)
  8.  
  9. if event == "COMBAT_LOG_EVENT_UNFILTERED"
  10. then
  11. local npcID = select(6, strsplit('-', destGUID))
  12. if (subevent == "SPELL_AURA_APPLIED"
  13. or subevent == "SPELL_AURA_REFRESH")
  14. and sourceGUID == UnitGUID("player")
  15. and aura_env.spells[spellID]
  16. and tonumber(npcID) == 103679
  17. then
  18.  
  19. local unitID = UnitGUID("target") == destGUID and "target"
  20. or UnitGUID("focus") == destGUID and "focus"
  21. or UnitGUID("mouseover") == destGUID and "mouseover"
  22. or UnitGUID("targettarget") == destGUID and "targettarget"
  23. if UnitExists(unitID) then
  24. local name, _, icon, _, _, duration, expires = UnitDebuff(unitID, GetSpellInfo(spellID), nil, "PLAYER")
  25. aura_env.TSU(allstates, spellID, name, "timed", duration, expires,0, icon, nil, spellID)
  26. end
  27. end
  28. if subevent == "SPELL_CAST_SUCCESS"
  29. and sourceGUID == UnitGUID("player")
  30. and spellID == 980
  31. and tonumber(npcID) == 103679
  32. and allstates[980]
  33. then
  34. aura_env.agony = destGUID
  35. end
  36.  
  37. if subevent == "SPELL_SUMMON"
  38. and sourceGUID == UnitGUID("player")
  39. and spellID == 205178
  40. then
  41. aura_env.clearTSU(allstates)
  42. end
  43. end
  44.  
  45. if event == "UNIT_AURA"
  46. and UnitGUID(...) == aura_env.agony
  47. then
  48. local unitID, _ = ...
  49. if UnitExists(unitID) then
  50. local name, _, icon, _, _, duration, expires = UnitDebuff(unitID, GetSpellInfo(980), nil, "PLAYER")
  51. aura_env.TSU(allstates, 980, name, "timed", duration, expires,0, icon, nil, 980)
  52.  
  53. aura_env.agony = nil
  54. end
  55. end
  56.  
  57. if event == "PLAYER_TOTEM_UPDATE"
  58. and not GetTotemInfo(4)
  59. then
  60. aura_env.clearTSU(allstates)
  61. end
  62.  
  63. return true
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement