Bläddra i källkod

Fix spellcasters with massive spells

Ivan Savenko 2 år sedan
förälder
incheckning
9a19feaf4a

+ 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