瀏覽代碼

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)
 	{