mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Nullkiller: fix crash
This commit is contained in:
@@ -65,7 +65,7 @@ void DefenceBehavior::evaluateDefence(Goals::TGoalVec & tasks, const CGTownInsta
|
||||
{
|
||||
if(!ai->nullkiller->isHeroLocked(town->garrisonHero.get()))
|
||||
{
|
||||
if(!town->visitingHero)
|
||||
if(!town->visitingHero && cb->getHeroesInfo().size() < GameConstants::MAX_HEROES_PER_PLAYER)
|
||||
{
|
||||
tasks.push_back(Goals::sptr(Goals::ExchangeSwapTownHeroes(town, nullptr).setpriority(5)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user