So, ParserLib defaults to "auto mode" that if anyone registered a "Parser_Message_Hit", ParserLib registers all events containing "hit" message.
Addons can choose to do the "manual mode" if they want, may be with a call to something like parser:SetAutoRegister("addonID", false). In this case, they'll have to specific what events they want by parser:RegisterEvent("addonID", "event") (leave handler nil).
In this case, I'll need some way to know who you are, to check that you are in manual mode or not when AceEvent_EventRegistered is fired, so "addonID" should be the reference to self. ( Because when AceEvent_EventRegistered fired, I got your class object reference. )
So the usage is something like this:
parser:SetAutoRegister(self, false) parser:RegisterEvent(self, "CHAT_MSG_COMBAT_SELF_HITS"); -- don't pass a handler self:RegisterEvent("Parser_Message_Hit"); -- ParserLib will not register to any Blizzard event by this call.
or like this:
self:RegisterEvent("Parser_Message_Hit"); -- ParserLib will registers to all Blizzard events containing "hit" patterns.
when CHAT_MSG_COMBAT_SELF_HITS occurs, ParserLib will fire Parser_CHAT_MSG_COMBAT_SELF_HITS AND Parser_Message_Hit if there are addon registered to them.
hmm......... need wait till I'm not so busy IRL before I can really think about these carefully :X