I set up an event listener for COMBAT_LOG_EVENT_UNFILTERED, and then put in a listener for the unit_died event, as seen below, but what I noticed is when a guard was killing an enemy next to me, it would print that event as well.
If curious function for simple printing event below
Code:
function MyMod.UNIT_DIED(...)
print(string.join(",", tostringall(...)))
end
I guess I was wondering how WoW recognizes that YOU killed a unit, vs a unit dying near you(that you just so happened to kill in some cases)
I was thinking about nesting this inside another listener for when combat starts to start the second listener, but if I was fighting two enemies at once, we would run into a problem, as well as that not really being KISS.
I suppose there is PARTY_KILL, but you need to start a party to get that call, which isnt really useful at that point.
Pardon me if I am just not seeing something right in front of me, as this is my first time working inside the WoW API.
Any help is greatly appreciated!