diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index accd75b7c..f27ffd496 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -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("female", sex, 1, 0, 0xFF);