Adds choice pointer to flee prevention script.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-03-27 15:10:56 +01:00
parent 4dd3700352
commit d6858c2d44
2 changed files with 6 additions and 4 deletions

View File

@@ -274,7 +274,7 @@ void TurnHandler::ExecuteFleeChoice(const ArbUt::BorrowedPtr<FleeTurnChoice>& ch
}
bool preventRun = false;
HOOK(PreventRunAway, choice, &preventRun);
HOOK(PreventRunAway, choice, choice, &preventRun);
if (preventRun) {
return;
}
@@ -286,7 +286,7 @@ void TurnHandler::ExecuteFleeChoice(const ArbUt::BorrowedPtr<FleeTurnChoice>& ch
if (!creature.HasValue()) {
continue;
}
HOOK(PreventOpponentRunAway, creature.GetValue(), &preventRun);
HOOK(PreventOpponentRunAway, creature.GetValue(), choice, &preventRun);
if (preventRun) {
return;
}