1
0
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:
Michał W. Urbańczyk
2013-05-18 22:30:48 +00:00
parent f95e6c233b
commit be7c2bd07f
19 changed files with 113 additions and 75 deletions

View File

@ -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: