From 1678b3e40f6d23ca5652e073424c851ded01430e Mon Sep 17 00:00:00 2001 From: Patman64 Date: Mon, 5 Jan 2015 21:24:55 -0500 Subject: [PATCH] Invalidate ElunaObjects after hook calls. --- HookMgr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HookMgr.cpp b/HookMgr.cpp index 33d21db..288736a 100644 --- a/HookMgr.cpp +++ b/HookMgr.cpp @@ -168,8 +168,12 @@ int Eluna::CallOneFunction(int number_of_functions, int number_of_arguments, int void Eluna::CleanUpStack(int number_of_arguments) { // Stack: event_id, [arguments] + lua_pop(L, number_of_arguments + 1); // Add 1 because the caller doesn't know about `event_id`. // Stack: (empty) + + if (event_level == 0) + InvalidateObjects(); } /*