mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna reimplement lock and improve hook handling
This commit is contained in:
@@ -750,15 +750,19 @@ void Eluna::EventBind::Insert(int eventId, int funcRef)
|
||||
Bindings[eventId].push_back(funcRef);
|
||||
}
|
||||
|
||||
bool Eluna::EventBind::BeginCall(int eventId) const
|
||||
bool Eluna::EventBind::HasEvents(int eventId) const
|
||||
{
|
||||
if (Bindings.empty())
|
||||
return false;
|
||||
if (Bindings.find(eventId) == Bindings.end())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Eluna::EventBind::BeginCall(int eventId) const
|
||||
{
|
||||
lua_settop(sEluna->L, 0); // stack should be empty
|
||||
sEluna->Push(sEluna->L, eventId);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Eluna::EventBind::ExecuteCall()
|
||||
|
||||
Reference in New Issue
Block a user