1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-07 07:10:04 +02:00

Fix case of "Got false in applying struct CastAdvSpell"

Heroes now leave the garrison before trying (and failing) to cast adventure-map-spells.
This commit is contained in:
Xilmi 2024-09-30 17:57:41 +02:00
parent 58eeccd119
commit d59a1fe9e9

View File

@ -53,6 +53,9 @@ void AdventureSpellCast::accept(AIGateway * ai)
throw cannotFulfillGoalException("The town is already occupied by " + town->visitingHero->getNameTranslated());
}
if (hero->inTownGarrison)
ai->myCb->swapGarrisonHero(hero->visitedTown);
auto wait = cb->waitTillRealize;
cb->waitTillRealize = true;