mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
@@ -309,7 +309,11 @@ const CHeroClass * CGHeroInstance::getHeroClass() const
|
||||
|
||||
HeroClassID CGHeroInstance::getHeroClassID() const
|
||||
{
|
||||
return getHeroType()->heroClass->getId();
|
||||
auto heroType = getHeroTypeID();
|
||||
if (heroType.hasValue())
|
||||
return getHeroType()->heroClass->getId();
|
||||
else
|
||||
return HeroClassID();
|
||||
}
|
||||
|
||||
const CHero * CGHeroInstance::getHeroType() const
|
||||
|
||||
Reference in New Issue
Block a user