Преглед изворни кода

Do not display "Spell Cancelled" message on right-click when no stack is
active

Ivan Savenko пре 1 година
родитељ
комит
e21e3f8386
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      client/battle/BattleActionsController.cpp

+ 1 - 1
client/battle/BattleActionsController.cpp

@@ -999,7 +999,7 @@ void BattleActionsController::onHexRightClicked(BattleHex clickedHex)
 		return action.spellcast();
 	};
 
-	bool isCurrentStackInSpellcastMode = std::all_of(possibleActions.begin(), possibleActions.end(), spellcastActionPredicate);
+	bool isCurrentStackInSpellcastMode = !possibleActions.empty() && std::all_of(possibleActions.begin(), possibleActions.end(), spellcastActionPredicate);
 
 	if (spellcastingModeActive() || isCurrentStackInSpellcastMode)
 	{