Eluna add mutex lock for hook calls

This commit is contained in:
Rochet2
2015-01-03 22:20:30 +02:00
parent 5bf5b11c6f
commit 092c61c20b
3 changed files with 14 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ using namespace HookMgr;
#define EVENT_BEGIN(BINDMAP, EVENT, RET) \
if (!BINDMAP->HasEvents(EVENT)) \
RET; \
ELUNA_LOCK(this); \
const char* _LuaBindType = this->BINDMAP->groupName; \
uint32 _LuaEvent = EVENT; \
int _LuaStackTop = lua_gettop(L); \
@@ -78,6 +79,7 @@ using namespace HookMgr;
#define ENTRY_BEGIN(BINDMAP, ENTRY, EVENT, RET) \
if (!BINDMAP->HasEvents(ENTRY, EVENT)) \
RET; \
ELUNA_LOCK(this); \
const char* _LuaBindType = this->BINDMAP->groupName; \
uint32 _LuaEvent = EVENT; \
int _LuaStackTop = lua_gettop(L); \