1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix. Don't skip usual condition.

This commit is contained in:
DJWarmonger 2017-11-04 22:50:11 +01:00
parent 3eb5de9534
commit bf20b165ec

View File

@ -3312,8 +3312,9 @@ bool shouldVisit(HeroPtr h, const CGObjectInstance * obj)
case Obj::TAVERN: case Obj::TAVERN:
{//TODO: make AI actually recruit heroes {//TODO: make AI actually recruit heroes
//TODO: only on request //TODO: only on request
return (ai->myCb->getHeroesInfo().size() < VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) && if ((ai->myCb->getHeroesInfo().size() >= VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) ||
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE >= GameConstants::HERO_GOLD_COST); (ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE < GameConstants::HERO_GOLD_COST))
return false;
} }
case Obj::BOAT: case Obj::BOAT:
return false; return false;