Просмотр исходного кода

Fixed http://bugs.vcmi.eu/view.php?id=2302

AlexVinS 9 лет назад
Родитель
Сommit
22d885af22
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      lib/spells/BattleSpellMechanics.cpp

+ 5 - 0
lib/spells/BattleSpellMechanics.cpp

@@ -346,6 +346,11 @@ ESpellCastProblem::ESpellCastProblem EarthquakeMechanics::canBeCast(const CBattl
 			return ESpellCastProblem::NO_APPROPRIATE_TARGET;
 	}
 
+	const auto attackableBattleHexes = cb->getAttackableBattleHexes();
+
+	if(attackableBattleHexes.empty())
+		return ESpellCastProblem::NO_APPROPRIATE_TARGET;
+
 	return ESpellCastProblem::OK;
 }