mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.
Should fix #1260.
This commit is contained in:
@ -757,9 +757,9 @@ CGHeroInstance::CGHeroInstance()
|
||||
secSkills.push_back(std::make_pair(SecondarySkill::DEFAULT, -1));
|
||||
}
|
||||
|
||||
void CGHeroInstance::initHero(int SUBID)
|
||||
void CGHeroInstance::initHero(HeroTypeID SUBID)
|
||||
{
|
||||
subID = SUBID;
|
||||
subID = SUBID.getNum();
|
||||
initHero();
|
||||
}
|
||||
|
||||
@ -4355,7 +4355,7 @@ bool CQuest::checkQuest (const CGHeroInstance * h) const
|
||||
}
|
||||
return true;
|
||||
case MISSION_HERO:
|
||||
if (m13489val == h->type->ID)
|
||||
if (m13489val == h->type->ID.getNum())
|
||||
return true;
|
||||
return false;
|
||||
case MISSION_PLAYER:
|
||||
|
Reference in New Issue
Block a user