1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
Taken from !684. This fixes a bug with primary skills that results in
heroes not being able to interact with objects, or skills being
incorrect when moving from mission to mission.
This commit is contained in:
Agoston Szepessy 2022-03-11 11:15:44 -08:00 committed by Andrii Danylchenko
parent bfd57ab5b5
commit 5080f26235

View File

@ -1431,6 +1431,15 @@ void CGHeroInstance::serializeCommonOptions(JsonSerializeFormat & handler)
{
handler.serializeString("biography", biography);
handler.serializeInt("experience", exp, 0);
if (!handler.saving)
{
while (gainsLevel())
{
++level;
}
}
handler.serializeString("name", name);
handler.serializeBool<ui8>("female", sex, 1, 0, 0xFF);