106 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
--[[
 | 
						|
Maybe improve later
 | 
						|
Can use names from
 | 
						|
https://wow.gamepedia.com/Specialization > spec
 | 
						|
Can find link from scanning spellbook
 | 
						|
Can find ID from link >> |Hspell:186265:0[Aspect of the Turtle]
 | 
						|
Store ID and spec to table
 | 
						|
 
 | 
						|
/run WeakAuras.ScanEvents("ADD_PLAYER", UnitGUID("target"))
 | 
						|
WeakAuras.ScanEvents("PLAYER_FOUND", caster, aura_env.trackList[caster].class, aura_env.trackList[caster].spec)
 | 
						|
]]
 | 
						|
--ADD_PLAYER COMBAT_LOG_EVENT_UNFILTERED
 | 
						|
function(e, ...)
 | 
						|
    if e == "ADD_PLAYER" then
 | 
						|
        local guid = ...
 | 
						|
        if not aura_env.trackList[guid] then
 | 
						|
            aura_env.trackList[guid] = true
 | 
						|
        end
 | 
						|
    elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
 | 
						|
        local se = select(2, ...)
 | 
						|
        local guid = select(4, ...)
 | 
						|
        if se == "SPELL_CAST_SUCCESS" then
 | 
						|
            local sid = select(12, ...)
 | 
						|
            if aura_env.abilities[sid] and aura_env.trackList[guid] == true then
 | 
						|
                aura_env.trackList[guid] = {
 | 
						|
                    ["class"] = aura_env.classes[aura_env.abilities[sid]],
 | 
						|
                    ["spec"] = aura_env.abilities[sid],
 | 
						|
                }
 | 
						|
                WeakAuras.ScanEvents("PLAYER_FOUND", guid, aura_env.trackList[guid].class, aura_env.trackList[guid].spec)
 | 
						|
                aura_env.trackList[guid] = nil
 | 
						|
                --DevTools_Dump(aura_env.trackList)
 | 
						|
            end
 | 
						|
        end
 | 
						|
    end
 | 
						|
end
 | 
						|
--Works OK
 | 
						|
--INIT
 | 
						|
aura_env.trackList = {}
 | 
						|
aura_env.abilities = {
 | 
						|
    --Warrior
 | 
						|
    [12294] = "Arms", --Mortal Strike
 | 
						|
    [209577] = "Arms", --Warbreaker A
 | 
						|
    [85288] = "Fury", --Raging Blow
 | 
						|
    [205545] = "Fury", --Odyn's Fury A
 | 
						|
    
 | 
						|
    --Paladin
 | 
						|
    [35395] = "Retribution", --Crusader Strike
 | 
						|
    [217020] = "Retribution", --Zeal
 | 
						|
    [205273] = "Retribution", --Wake of Ashes A
 | 
						|
    
 | 
						|
    --Rogue
 | 
						|
    [192759] = "Assasination", --Kingsbane A
 | 
						|
    [703] = "Assasination", --Garrote
 | 
						|
    [1329] = "Assasination", --Mutilate
 | 
						|
    [1943] = "Assasination", --Rupture
 | 
						|
    [32645] = "Assasination", --Envenom
 | 
						|
    [202665] = "Outlaw", --Curse of the Dreadblades A
 | 
						|
    [193315] = "Outlaw", --Saber Slash
 | 
						|
    [185763] = "Outlaw", --Pistol Shot
 | 
						|
    [2098] = "Outlaw", --Run Through
 | 
						|
    [199804] = "Outlaw", --Between the Eyes
 | 
						|
    [209782] = "Subelty", --Goremaws Bite A
 | 
						|
    [185313] = "Subelty", --Shadow Dance
 | 
						|
    [19452] = "Subelty", --Nightblade
 | 
						|
    [185438] = "Subelty", --Shadowstrike
 | 
						|
    [53] = "Subelty", --Backstab
 | 
						|
    
 | 
						|
    --Death Knight
 | 
						|
    [85948] = "Unholy", --Festering Strike
 | 
						|
    [47541] = "Unholy", --Death Coil
 | 
						|
    [220143] = "Unholy", --Apocalypse A
 | 
						|
    [49143] = "Frost", --Frost Strike
 | 
						|
    [49148] = "Frost", --Howling Blast
 | 
						|
    [49020] = "Frost", --Obliterate
 | 
						|
    
 | 
						|
    --Shaman
 | 
						|
    [193796] = "Enhancement", --Flametongue
 | 
						|
    [17364] = "Enhancement", --Stormstrike
 | 
						|
    [204945] = "Enhancement", --Doom Winds A
 | 
						|
    
 | 
						|
    --Monk
 | 
						|
    [113656] = "Windwalker", --Fists of Fury
 | 
						|
    [205320] = "Windwalker", --Strike of the Windlord A
 | 
						|
    
 | 
						|
    --Demon Hunter
 | 
						|
}
 | 
						|
aura_env.classes = {
 | 
						|
    ["Fury"] = 1,
 | 
						|
    ["Arms"] = 1,
 | 
						|
    
 | 
						|
    ["Retribution"] = 2,
 | 
						|
    
 | 
						|
    ["Assasination"] = 4,
 | 
						|
    ["Subelty"] = 4,
 | 
						|
    ["Outlaw"] = 4,
 | 
						|
    
 | 
						|
    ["Frost"] = 6,
 | 
						|
    ["Unholy"] = 6,
 | 
						|
    
 | 
						|
    ["Enhancement"] = 7,
 | 
						|
    
 | 
						|
    ["Windwalker"] = 10,
 | 
						|
    
 | 
						|
    ["Havoc"] = 12,
 | 
						|
}
 |