mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
fixed assertion if hero instance in VCMI map have 0 at one of primary skills
This commit is contained in:
parent
a3b04da5f0
commit
4b2a118ffa
@ -1644,8 +1644,7 @@ void CGHeroInstance::serializeCommonOptions(JsonSerializeFormat & handler)
|
||||
{
|
||||
int value = 0;
|
||||
handler.serializeInt(PrimarySkill::names[i], value, 0);
|
||||
if(value != 0)
|
||||
pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(i), value);
|
||||
pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(i), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user