1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Invite hero setting

This commit is contained in:
Laserlicht
2024-01-20 01:24:34 +01:00
committed by GitHub
parent 346beea49c
commit 4813179abb
7 changed files with 34 additions and 2 deletions

View File

@@ -114,7 +114,7 @@ void HeroPoolProcessor::selectNewHeroForSlot(const PlayerColor & color, TavernHe
CGHeroInstance *newHero = pickHeroFor(needNativeHero, color);
const auto & heroesPool = gameHandler->gameState()->heroesPool;
if(gameHandler->getStartInfo()->extraOptionsInfo.unlimitedReplay && heroesPool->unusedHeroesFromPool().count(nextHero) && heroesPool->isHeroAvailableFor(nextHero, color))
if(gameHandler->getStartInfo()->extraOptionsInfo.inviteHero && heroesPool->unusedHeroesFromPool().count(nextHero) && heroesPool->isHeroAvailableFor(nextHero, color))
newHero = heroesPool->unusedHeroesFromPool()[nextHero];
if (newHero)