Addon Info.
Change Log
Archived (2)
Comments (1)
  Category: Libraries
Addon Information
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
Beladona's Portal Bug Reports Feature Requests
Author:
Version:
30000.4
Date:
08-09-2008 09:49 AM
Size:
1.95 Kb
Downloads:
313
Favorites:
3
MD5:
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.
  Change Log - LibWombat
30000.4
---------------------------------------
* fixed a long comment error
* changed an unpack to a normal variable return for performance reasons
  Archived Versions - LibWombat
File Name
Version
Size
Author
Date
30000.3
2kB
Beladona
08-09-2008 09:43 AM
30000.2
2kB
Beladona
07-26-2008 06:31 AM
  Comments - LibWombat
Post A Reply
Author Comments Comment Options
Old 09-26-2008, 12:46 AM  
Nikishin
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
BUG

In ruRU version (dunno about other versions) packing-unpacking args in "OnEvent" func loses some arguments.

Check eventtype == SPELL_CAST_FAILED, it passes only 6 args instead of 12. No info about spellID, spellName, spellSchool.

P.S. I figured where problem was
Code:
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 =\

Last edited by Nikishin : 09-26-2008 at 12:51 AM.
Nikishin is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:



The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOUI | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


MMOInterface.com Copyright ©2008
World of Warcraft is a registered Trademark of Blizzard Entertainment.
vBulletin - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.