Browse Source

Actually use ANY_CREATURE possible action

* this fixes mantiss 0002140
AlexVinS 10 years ago
parent
commit
e1deff089d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      client/battle/CBattleInterface.cpp

+ 6 - 0
client/battle/CBattleInterface.cpp

@@ -2177,6 +2177,10 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
 					legalAction = true;
 				}
 				break;
+			case ANY_CREATURE:
+				if (shere && shere->alive() && isCastingPossibleHere (sactive, shere, myNumber))
+					legalAction = true;
+				break;				
 			case HOSTILE_CREATURE_SPELL:
 				if (shere && shere->alive() && !ourStack && isCastingPossibleHere (sactive, shere, myNumber))
 					legalAction = true;
@@ -2372,6 +2376,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
 				break;
 			case HOSTILE_CREATURE_SPELL:
 			case FRIENDLY_CREATURE_SPELL:
+			case ANY_CREATURE:
 				sp = CGI->spellh->objects[creatureCasting ? creatureSpellToCast : spellToCast->additionalInfo]; //necessary if creature has random Genie spell at same time
 				consoleMsg = boost::str(boost::format(CGI->generaltexth->allTexts[27]) % sp->name % shere->getName()); //Cast %s on %s
 				switch (sp->id)
@@ -2442,6 +2447,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
 	{
 		switch (illegalAction)
 		{
+			case ANY_CREATURE:
 			case HOSTILE_CREATURE_SPELL:
 			case FRIENDLY_CREATURE_SPELL:
 			case RANDOM_GENIE_SPELL: