mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
- Fix to previous commit (keep heroes which are in heroes pool too)
This commit is contained in:
parent
d0a5a6eab4
commit
674c8bc591
@ -5160,6 +5160,15 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
|
|||||||
crossoverHeroes.push_back(hero);
|
crossoverHeroes.push_back(hero);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep lost heroes which are in heroes pool
|
||||||
|
for(auto & heroPair : gs->hpool.heroesPool)
|
||||||
|
{
|
||||||
|
if(vstd::contains(gs->scenarioOps->campState->getCurrentScenario().keepHeroes, HeroTypeID(heroPair.first)))
|
||||||
|
{
|
||||||
|
crossoverHeroes.push_back(heroPair.second.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gs->scenarioOps->campState->setCurrentMapAsConquered(crossoverHeroes);
|
gs->scenarioOps->campState->setCurrentMapAsConquered(crossoverHeroes);
|
||||||
|
|
||||||
//Request clients to change connection mode
|
//Request clients to change connection mode
|
||||||
|
Loading…
Reference in New Issue
Block a user