mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna add mutex lock for hook calls
This commit is contained in:
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user