LibWombat

This library endeavors to provide a callback function for combat log events. It basically handles the job of intercepting unfiltered combat events, and dispatching them to any callback functions you create. If a callback is not registered for a particular event, it doesn't process anything, thereby saving memory. Think of it as a filter for unfiltered combat events.

An example of how to use it is included in the file LibWombat.lua at the bottom. Feel free to expand on it as needed. The entire library is designed to work in a similar nature to :RegisterEvent

I wrote this addon for all of those people out there that were unsure of how to handle combat log events on their own. The purpose is to make it stupid easy to get the data you need, using a proven method everyone is used to using.

30000.4
---------------------------------------
* fixed a long comment error
* changed an unpack to a normal variable return for performance reasons

watcher:SetScript("OnEvent",function(...)
....
for i = 1,2 do table.remove(args,1); end <- HERE is the problem, tbh i dunno what can be wrong here =\
...

so, my solution is

Code:

watcher:SetScript("OnEvent",function(self, cleu, ...)
local args = {...};
local event = args[2];
if (wombat.watched[event]) then
for serial,callback in pairs(wombat.watched[event]) do callback(unpack(args)); end
end
end);

no other code needs to be changed and it doesnt need to recode other addons using this one

PPS This bug also had been ruined UNIT_DIED event. I was wonder why no args was passed with this event =\