Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MINIONS
- local minions = {}
- ns.updateMinion = function( id, time )
- minions[ id ] = time
- end
- ns.isMinion = function( id ) return minions[ id ] ~= nil end
- RegisterEvent( "COMBAT_LOG_EVENT_UNFILTERED", function( event, _, subtype, _, sourceGUID, sourceName, _, _, destGUID, destName, destFlags, _, spellID, spellName, _, amount, interrupt, a, b, c, d, offhand, multistrike, ... )
- local time = GetTime()
- if subtype == 'UNIT_DIED' or subtype == 'UNIT_DESTROYED' then
- ns.updateMinion( destGUID )
- return
- end
- if subtype == 'SPELL_SUMMON' and sourceGUID == UnitGUID('player') then
- ns.updateMinion( destGUID, time )
- return
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement