Advertisement
krazyito65

soul effigy [WIP] code

May 10th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.33 KB | None | 0 0
  1. --Trigger: Dot Parser
  2. --Events: COMBAT_LOG_EVENT_UNFIILTERED
  3. --5/10 13:31:46.330  SPELL_SUMMON,Player-970-000AAEDB,"Krazylock-BetaLevelingRealm03",0x511,0x0,Creature-0-2084-870-10-103679-0000322911,"Soul Effigy",0xa28,0x0,205178,"Soul Effigy",0x20
  4. function(event, ...)
  5.  
  6.     local destGUID = select(8, ...) -- the GUID of the soul effigy
  7.     local sourceGUID = select(4, ...) -- The current player who we are looking for
  8.     local subevent = select(2, ...) --Combat log events.
  9.     local spellid = select(12, ...)
  10.     local Soul_Effigy_SPELLID = 205178 -- only really used for summon
  11.     local SAR = "SPELL_AURA_REMOVED"
  12.     local SAA = "SPELL_AURA_APPLIED"
  13.     local SARe = "SPELL_AURA_REFRESH"
  14.  
  15.    
  16.  
  17.     if subevent == "SPELL_SUMMON" and sourceGUID == aura_env.playerGUID and spellid == Soul_Effigy_SPELLID then -- we only want to worry about effigy summons, not other summons
  18.         --We have summoned a new effigy casted by the player
  19.         aura_env.effigyGUID = destGUID -- assign it the new GUID (not sure if ID even changes, but just in case.)
  20.         aura_env.DotTable = {} -- clear the table
  21.     end
  22.  
  23.     if effigyGUID == nil then
  24.         return false
  25.     end
  26.  
  27.     -- possibly make back up function here to check if your target or mouseover is the current Effigy and hard update everything based on this instead of combat logs.
  28.     --[[
  29.     if UnitGUID("target") == aura_env.effigyGUID or UnitGUID("mouseover") == aura_env.effigyGUID or UnitGUID("focus") == aura_env.effigyGUID then
  30.         UnitDebuff(agony)......
  31.         UnitDebuff(corruption)
  32.         UnitDebuff(Haunt)
  33.         UnitDebuff(Unstable Affliction).......
  34.  
  35.         -- basically hard update my tables based on these debuffs.
  36.     end
  37.     ]]
  38.  
  39.     if (subevent == SAA or subevent == SARe) and (destGUID == aura_env.effigyGUID) then
  40.         -- we have applied a dot to the effigy
  41.         -- get the current time when the dot was applied.
  42.         -- I don't want to hard code the duration of every dot... Need to find a way to use the API to get the duration (this def needs to happen)
  43.         -- in regards to above, possibly hard code the duration in the new auras? (TimeCasted + dot duration), problems occur with pandemic..
  44.     end
  45.  
  46.     if subevent == SAR then
  47.         -- remove dot from table
  48.     end
  49.  
  50. end
  51.  
  52. --OnInit: Dot Parser
  53. function()
  54.     aura_env.playerGUID = UnitGUID("player")
  55.     aura_env.effigyGUID = nil
  56.     aura_env.DotTable = {}
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement