Files
wow-weakauras/WeakAuras/Projects/DickRiderCounter.lua

31 lines
853 B
Lua

COMBAT_LOG_EVENT_UNFILTERED
function(...)
local subEvent = select(3, ...)
local ID = select(5, ...)
local source = select(6, ...)
local target = select(10, ...)
if target == UnitName("player") and (subEvent == "SWING_DAMAGE" or subEvent == "SPELL_DAMAGE") and string.match(ID, "Player") then
local targetExist = 0
for k, v in ipairs(aura_env.dickRiders) do
if source == v then
targetExist = 1
end
end
if targetExist == 0 then
aura_env.dickRiders[table.getn(aura_env.dickRiders) + 1] = source
end
end
end
DISPLAY
function()
local output = table.getn(aura_env.dickRiders) .. "\n"
for k, v in ipairs(aura_env.dickRiders) do
output = output .. v .. "\n"
end
return output
end
INIT AND SHOW
aura_env.dickRiders = {}