mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Added more BG hooks, fixed a few issues
This commit is contained in:
35
HookMgr.cpp
35
HookMgr.cpp
@@ -1935,10 +1935,41 @@ CreatureAI* Eluna::GetAI(Creature* creature)
|
||||
|
||||
void Eluna::OnBGStart(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
||||
{
|
||||
ENTRY_BEGIN(BGEventBindings, bg->GetTypeID(), BG_EVENT_ON_START, return);
|
||||
EVENT_BEGIN(BGEventBindings, BG_EVENT_ON_START, return);
|
||||
Push(L, bg);
|
||||
Push(L, bgId);
|
||||
Push(L, instanceId);
|
||||
ENTRY_EXECUTE(0);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnBGEnd(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId, Team winner)
|
||||
{
|
||||
EVENT_BEGIN(BGEventBindings, BG_EVENT_ON_END, return);
|
||||
Push(L, bg);
|
||||
Push(L, bgId);
|
||||
Push(L, instanceId);
|
||||
Push(L, winner);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnBGCreate(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
||||
{
|
||||
EVENT_BEGIN(BGEventBindings, BG_EVENT_ON_CREATE, return);
|
||||
Push(L, bg);
|
||||
Push(L, bgId);
|
||||
Push(L, instanceId);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnBGDestroy(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
||||
{
|
||||
EVENT_BEGIN(BGEventBindings, BG_EVENT_ON_PRE_DESTROY, return);
|
||||
Push(L, bg);
|
||||
Push(L, bgId);
|
||||
Push(L, instanceId);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
Reference in New Issue
Block a user