Ensure Attack script is deleted when not taken by ExecutingAttack.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -63,6 +63,7 @@ void TurnHandler::ExecuteAttackChoice(AttackTurnChoice* choice) {
|
||||
ArbUt::List<Creature*> targets = {target};
|
||||
|
||||
auto attack = ExecutingAttack(targets, 1, choice->GetUser(), choice->GetAttack(), choice->GetAttackScript());
|
||||
choice->MarkScriptAsTaken();
|
||||
bool prevented = false;
|
||||
HOOK_LOCAL(PreventAttack, attack, &attack, &prevented);
|
||||
if (prevented) {
|
||||
|
||||
Reference in New Issue
Block a user