Actually implement handling of StopBeforeAttack script hook
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-03 19:11:44 +01:00
parent c6620021a7
commit cd7ddcf78e
2 changed files with 6 additions and 2 deletions

View File

@@ -82,7 +82,11 @@ void TurnHandler::ExecuteAttackChoice(AttackTurnChoice* choice) {
return;
}
HOOK(StopBeforeAttack, attack, attack);
bool stopBeforeAttack = false;
HOOK(StopBeforeAttack, attack, attack, &stopBeforeAttack);
if (stopBeforeAttack) {
return;
}
HOOK(OnBeforeAttack, attack, attack);
for (auto& kv : attack->GetTargets()) {