1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Merge pull request #2973 from IvanSavenko/identifier_explicit_constructor

Improvements to type safety of Identifier class
This commit is contained in:
Ivan Savenko
2023-10-05 00:33:07 +03:00
committed by GitHub
53 changed files with 695 additions and 464 deletions

View File

@@ -167,11 +167,11 @@ public:
pset.castle = pinfo.defaultCastle();
pset.hero = pinfo.defaultHero();
if(pset.hero.getNum() != PlayerSettings::RANDOM && pinfo.hasCustomMainHero())
if(pset.hero != HeroTypeID::RANDOM && pinfo.hasCustomMainHero())
{
pset.hero = pinfo.mainCustomHeroId;
pset.heroNameTextId = pinfo.mainCustomHeroNameTextId;
pset.heroPortrait = pinfo.mainCustomHeroPortrait;
pset.heroPortrait = HeroTypeID(pinfo.mainCustomHeroPortrait);
}
pset.handicap = PlayerSettings::NO_HANDICAP;