From 7466839182c027c6d5dba29259a1857146bacd78 Mon Sep 17 00:00:00 2001 From: val-gaav <104362626+val-gaav@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:13:41 +0200 Subject: [PATCH] Update AIGateway.cpp --- AI/Nullkiller/AIGateway.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AI/Nullkiller/AIGateway.cpp b/AI/Nullkiller/AIGateway.cpp index afd5e412a..00434ca0c 100644 --- a/AI/Nullkiller/AIGateway.cpp +++ b/AI/Nullkiller/AIGateway.cpp @@ -1022,6 +1022,8 @@ bool AIGateway::canRecruitAnyHero(const CGTownInstance * t) const return false; if(cb->getHeroesInfo().size() >= ALLOWED_ROAMING_HEROES) return false; + if(cb->getHeroesInfo().size() >= VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) + return false; if(!cb->getAvailableHeroes(t).size()) return false; @@ -1665,4 +1667,4 @@ void AIStatus::setChannelProbing(bool ongoing) bool AIStatus::channelProbing() { return ongoingChannelProbing; -} \ No newline at end of file +}