Post by Ketho
I would check for the overkill parameter in
CLEU ..
I tried to write up a quick untested/drycoded (Ace3) example, with all parameters assigned for clarity:
local damageEvents = {
= true,
= true,
= true,
= true,
}
function MyAddon:COMBAT_LOG_EVENT_UNFILTERED(event, ...)
local timestamp, subevent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
local spellID, spellName, spellSchool
local SuffixParam1, SuffixParam2
local prefix = strsub(subevent, 1, 5)
if prefix == "SWING" then
SuffixParam1, SuffixParam2 = select(12, ...)
elseif prefix == "SPELL" or prefix == "RANGE" or prefix == "DAMAG" then
spellID, spellName, spellSchool, SuffixParam1, SuffixParam2 = select(12, ...)
end
if sourceGUID == UnitGUID("pet") and damageEvents and SuffixParam2 > 0 then
print("My pet killed "..destName.."!")
-- do stuff
end
end
overkill sometimes doesn't fire though, or can it fire multiple times on the same target, so it isn't a 100% safe way to track kills/deaths
=(