8e4c8f57e4
- Track mod-paragon and mod-ale (un-ignore modules in .gitignore). - Ship docker-compose.override.yml with CMAKE_EXTRA_OPTIONS for LuaJIT (mod-ale). - Dockerfile: CBUILD_PARALLEL default to limit OOM under Docker/WSL2. - Core: CLASS_PARAGON sticky combo points (DetachComboTarget), selection rebind, Spell::CheckPower rune path for multi-resource Paragon. - spell_dk_death_rune: IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_ABILITY) for Blood of the North / Reaping / DRM on Paragon. - Remove temporary Paragon CheckPower logging. Co-authored-by: Cursor <cursoragent@cursor.com>
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
/*
|
|
* Copyright (C) 2010 - 2025 Eluna Lua Engine <https://elunaluaengine.github.io/>
|
|
* This program is free software licensed under GPL version 3
|
|
* Please see the included DOCS/LICENSE.md for more information
|
|
*/
|
|
|
|
#include "Hooks.h"
|
|
#include "HookHelpers.h"
|
|
#include "LuaEngine.h"
|
|
#include "BindingMap.h"
|
|
#include "ALETemplate.h"
|
|
|
|
using namespace Hooks;
|
|
|
|
#define START_HOOK(EVENT) \
|
|
if (!ALEConfig::GetInstance().IsALEEnabled())\
|
|
return;\
|
|
auto key = EventKey<BGEvents>(EVENT);\
|
|
if (!BGEventBindings->HasBindingsFor(key))\
|
|
return;\
|
|
LOCK_ALE
|
|
|
|
void ALE::OnBGStart(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
|
{
|
|
START_HOOK(BG_EVENT_ON_START);
|
|
Push(bg);
|
|
Push(bgId);
|
|
Push(instanceId);
|
|
CallAllFunctions(BGEventBindings, key);
|
|
}
|
|
|
|
void ALE::OnBGEnd(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId, TeamId winner)
|
|
{
|
|
START_HOOK(BG_EVENT_ON_END);
|
|
Push(bg);
|
|
Push(bgId);
|
|
Push(instanceId);
|
|
Push(winner);
|
|
CallAllFunctions(BGEventBindings, key);
|
|
}
|
|
|
|
void ALE::OnBGCreate(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
|
{
|
|
START_HOOK(BG_EVENT_ON_CREATE);
|
|
Push(bg);
|
|
Push(bgId);
|
|
Push(instanceId);
|
|
CallAllFunctions(BGEventBindings, key);
|
|
}
|
|
|
|
void ALE::OnBGDestroy(BattleGround* bg, BattleGroundTypeId bgId, uint32 instanceId)
|
|
{
|
|
START_HOOK(BG_EVENT_ON_PRE_DESTROY);
|
|
Push(bg);
|
|
Push(bgId);
|
|
Push(instanceId);
|
|
CallAllFunctions(BGEventBindings, key);
|
|
}
|