Code:
myframe:SetScript("OnEvent", myframe.OnEvent)
myframe:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
function myFrame:OnEvent(e, ...)
if (e == "COMBAT_LOG_EVENT_UNFILTERED") then
time, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags,
arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 = select(1, ...)
... do stuff with arg1-arg10 based on the value of event ...
end
end
...
Code:
CombatMonitorEvent.Parse = function(self, _, time, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)
...
local _, _, prefix, suffix = string.find(event, "(.-)_(.+)")
if (prefix == "SWING") then
if (suffix == "DAMAGE") then
e.damage, e.damageType, e.resisted, e.blocked, e.absorbed, e.crit, _, e.crush = select(1, ...)
elseif (suffix == "MISSED") then
e.missType = select(1, ...)
end
elseif (prefix == "RANGE") then
if (suffix == "DAMAGE") then
e.spellID, e.spellName, e.damageType, e.damage, e.resisted, e.blocked, e.absorbed, e.crit, _, e.crush = select(1, ...)
elseif (suffix == "MISSED") then
e.spellID, e.spellName, e.damageType, e.missType = select(1, ...)
end
elseif (prefix == "SPELL") then
if (suffix == "DAMAGE") then
e.spellID, e.spellName, e.damageType, e.damage, e.resisted, e.blocked, e.absorbed, e.crit, _, e.crush = select(1, ...)
elseif (suffix == "MISSED") then
e.spellID, e.spellName, e.damageType, e.missType = select(1, ...)
elseif (suffix == "PERIODIC_DAMAGE") then
e.spellID, e.spellName, e.damageType, e.damage, e.resisted, e.blocked, e.absorbed, e.crit, _, e.crush = select(1, ...)
elseif (suffix == "PERIODIC_MISSED") then
e.spellID, e.spellName, e.damageType, e.missType = select(1, ...)
end
elseif (prefix == "DAMAGE") then
...
Bookmarks