I'm trying to extract the NPC ID of a npc I just killed (when I'm in a group).
I have the next code:
myFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
local timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
if (eventType == "PARTY_KILL" or eventType == "UNIT_DIED") then
local _, _, _, _, _, id = strsplit("-", destGUID)
print("ID found "..id)
This works sometimes... a lot of times the event is not fired.
Do you know if there are some limitations with this events or if I'm doing something wrong?