From 06f9759aeee1c106e52f6c3645e6165ccadb8a24 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 28 Mar 2023 23:50:42 +0300 Subject: [PATCH] Fix crash on using Teleport/Sacrifice spells --- client/battle/BattleActionsController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/battle/BattleActionsController.cpp b/client/battle/BattleActionsController.cpp index 6d86edb31..bcfc8c49d 100644 --- a/client/battle/BattleActionsController.cpp +++ b/client/battle/BattleActionsController.cpp @@ -689,14 +689,14 @@ void BattleActionsController::actionRealize(PossiblePlayerBattleAction action, B if (action.spell() == SpellID::SACRIFICE) { heroSpellToCast->aimToHex(targetHex); - possibleActions.push_back(PossiblePlayerBattleAction::SACRIFICE); + possibleActions.push_back({PossiblePlayerBattleAction::SACRIFICE, SpellID::SACRIFICE}); owner.stacksController->setSelectedStack(targetStack); return; } if (action.spell() == SpellID::TELEPORT) { heroSpellToCast->aimToUnit(targetStack); - possibleActions.push_back(PossiblePlayerBattleAction::TELEPORT); + possibleActions.push_back({PossiblePlayerBattleAction::TELEPORT, SpellID::TELEPORT}); owner.stacksController->setSelectedStack(targetStack); return; }