Browse Source

Fix crash on using Teleport/Sacrifice spells

Ivan Savenko 2 years ago
parent
commit
06f9759aee
1 changed files with 2 additions and 2 deletions
  1. 2 2
      client/battle/BattleActionsController.cpp

+ 2 - 2
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;
 				}