Allow temporary event handlers for all events.

This allows you to register a handler to only fire N times.

Dynamic event handler binding/unbinding is now possible.

For backwards compatibility, if the number of shots is missing, the event
handler will never be removed from the event.
This commit is contained in:
Patman64
2014-12-18 22:09:34 -05:00
parent f819245308
commit 8c40dd1692
5 changed files with 340 additions and 96 deletions

View File

@@ -154,7 +154,7 @@ public:
static void report(lua_State*);
void ExecuteCall(int params, int res);
void Register(uint8 reg, uint32 id, uint32 evt, int func);
void Register(uint8 reg, uint32 id, uint32 evt, int func, uint32 shots);
void RunScripts();
void InvalidateObjects();