瀏覽代碼

Fix spellcasters with massive spells

Ivan Savenko 2 年之前
父節點
當前提交
9a19feaf4a
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 3 0
      client/battle/BattleActionsController.cpp
  2. 4 0
      lib/battle/PossiblePlayerBattleAction.h

+ 3 - 0
client/battle/BattleActionsController.cpp

@@ -480,6 +480,9 @@ bool BattleActionsController::actionIsLegal(PossiblePlayerBattleAction action, B
 		case PossiblePlayerBattleAction::SHOOT:
 			return owner.curInt->cb->battleCanShoot(owner.stacksController->getActiveStack(), targetHex);
 
+		case PossiblePlayerBattleAction::NO_LOCATION:
+			return false;
+
 		case PossiblePlayerBattleAction::ANY_LOCATION:
 			return isCastingPossibleHere(action.spell().toSpell(), owner.stacksController->getActiveStack(), targetStack, targetHex);
 

+ 4 - 0
lib/battle/PossiblePlayerBattleAction.h

@@ -10,6 +10,8 @@
 
 #include "../GameConstants.h"
 
+VCMI_LIB_NAMESPACE_BEGIN
+
 class PossiblePlayerBattleAction // actions performed at l-click
 {
 public:
@@ -72,3 +74,5 @@ public:
 		return action == other.action && spellToCast == other.spellToCast;
 	}
 };
+
+VCMI_LIB_NAMESPACE_END