mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fix randomization of heroes in campaigns
This commit is contained in:
parent
1d430d0328
commit
bbd3312705
@ -217,6 +217,10 @@ void CGameStateCampaign::placeCampaignHeroes()
|
|||||||
|
|
||||||
for(auto & heroID : heroesToRemove)
|
for(auto & heroID : heroesToRemove)
|
||||||
{
|
{
|
||||||
|
// Do not replace reserved heroes initially, e.g. in 1st campaign scenario in which they appear
|
||||||
|
if (campaignState->getHeroByType(heroID).isNull())
|
||||||
|
continue;
|
||||||
|
|
||||||
auto * hero = gameState->getUsedHero(heroID);
|
auto * hero = gameState->getUsedHero(heroID);
|
||||||
if(hero)
|
if(hero)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user