1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-05 13:04:54 +02:00

Fix hero experience deserialization

This commit is contained in:
nordsoft 2022-12-04 16:58:46 +04:00
parent fb9711186b
commit bbe51bfaf4

View File

@ -1434,7 +1434,7 @@ void CGHeroInstance::serializeCommonOptions(JsonSerializeFormat & handler)
handler.serializeString("biography", biography);
handler.serializeInt("experience", exp, 0);
if (!handler.saving)
if(!handler.saving && exp != 0xffffffff) //do not gain levels if experience is not initialized
{
while (gainsLevel())
{