mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
fixed assertion if hero instance in VCMI map have 0 at one of primary skills
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user