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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user