mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix hero experience deserialization
This commit is contained in:
@@ -1434,7 +1434,7 @@ void CGHeroInstance::serializeCommonOptions(JsonSerializeFormat & handler)
|
|||||||
handler.serializeString("biography", biography);
|
handler.serializeString("biography", biography);
|
||||||
handler.serializeInt("experience", exp, 0);
|
handler.serializeInt("experience", exp, 0);
|
||||||
|
|
||||||
if (!handler.saving)
|
if(!handler.saving && exp != 0xffffffff) //do not gain levels if experience is not initialized
|
||||||
{
|
{
|
||||||
while (gainsLevel())
|
while (gainsLevel())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user