Fixed an issue that caused the AI to think it can townportal onto heroes of other factions, for example their allies.
@@ -1197,6 +1197,10 @@ void AINodeStorage::calculateTownPortal(
continue;
}
+ if (targetTown->visitingHero
+ && targetTown->visitingHero.get()->getFaction() != actor->hero->getFaction())
+ continue;
+
auto nodeOptional = townPortalFinder.createTownPortalNode(targetTown);
if(nodeOptional)