Commit Graph

14 Commits

Author SHA1 Message Date
Rochet2
3d645d8048 Add StackTracePlus, Rewrite not to recreate eluna on reload 2015-01-20 17:05:41 +02:00
Patman64
dd39592ddd Allow binding event handlers to individual Creatures.
Because GUIDs are, in fact, not globally unique on mangos, the actual
unique identifier is the GUID/instance ID pair of the Creature.

On Trinity Creatures in instances are assigned new GUIDs. This means that
the instance ID part is redundant but must be used anyway for consistency.
2015-01-11 18:48:38 -05:00
Rochet2
5e7b0ee0f7 Fix TC build, analysis warnings and triggering addon message hooks 2015-01-06 12:43:53 +02:00
Patman64
6371728547 Return from hooks early if no bindings exist.
Also add locking to the bindings to allow for thread-safe checking if
bindings exist.
2015-01-05 23:48:18 -05:00
Tommy
803a835668 Happy New Year 2015 2015-01-01 13:59:33 -05:00
Rochet2
07d25f5031 Eluna Fix static analysis noted warnings and errors 2014-12-23 23:21:13 +02:00
Patman64
f15373ea43 Allow event handlers to be cleared. 2014-12-21 01:58:22 -05:00
Rochet2
88dcea9cb7 Fix previous commits to be more efficient overall and have better logic. Also try fix clang error. 2014-12-19 14:19:00 +02:00
Patman64
ed8edf065c Fix bug in previous commit that caused temporary bindings to die early.
Instead of decrementing all their counters every time an event occurs,
only the counters of the bindings being executed will be decremented.

`_LuaTemporariesDied` is a small optimization to prevent unnecessary calls
to `UpdateTemporaryBindings`. It will only be called when a temporary
binding has run out of shots and needs to be cleaned up.
2014-12-19 00:46:50 -05:00
Patman64
8c40dd1692 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.
2014-12-18 22:09:34 -05:00
Patman64
3ff4c5f26e Allow multiple callbacks for the same entry/event combo.
The callbacks will be called in reverse-order of registration.
2014-12-15 02:16:37 -05:00
Rochet2
4784c2052a Eluna: Correct whitespace 2014-09-20 22:07:24 +03:00
Rochet2
94528114c9 Eluna fix typo in filename thanks Antz :3 2014-07-17 16:41:48 +03:00
Rochet2
a3359062e5 Eluna/Core Refactor code making LuaEngine.h lighter and splitting entities to their own files. Fixed reload crash for timed events 2014-07-16 16:12:07 +03:00