mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
fixed serialization for older savegames
This commit is contained in:
@ -69,7 +69,10 @@ public:
|
|||||||
h & objh;
|
h & objh;
|
||||||
h & objtypeh;
|
h & objtypeh;
|
||||||
h & spellh;
|
h & spellh;
|
||||||
h & skillh;
|
if(version >= 777)
|
||||||
|
{
|
||||||
|
h & skillh;
|
||||||
|
}
|
||||||
h & modh;
|
h & modh;
|
||||||
h & IS_AI_ENABLED;
|
h & IS_AI_ENABLED;
|
||||||
h & bth;
|
h & bth;
|
||||||
|
@ -303,5 +303,7 @@ public:
|
|||||||
h & visitedObjects;
|
h & visitedObjects;
|
||||||
BONUS_TREE_DESERIALIZATION_FIX
|
BONUS_TREE_DESERIALIZATION_FIX
|
||||||
//visitied town pointer will be restored by map serialization method
|
//visitied town pointer will be restored by map serialization method
|
||||||
|
if(version < 777 && !h.saving)
|
||||||
|
recreateSecondarySkillsBonuses();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "../ConstTransitivePtr.h"
|
#include "../ConstTransitivePtr.h"
|
||||||
#include "../GameConstants.h"
|
#include "../GameConstants.h"
|
||||||
|
|
||||||
const ui32 SERIALIZATION_VERSION = 776;
|
const ui32 SERIALIZATION_VERSION = 777;
|
||||||
const ui32 MINIMAL_SERIALIZATION_VERSION = 753;
|
const ui32 MINIMAL_SERIALIZATION_VERSION = 753;
|
||||||
const std::string SAVEGAME_MAGIC = "VCMISVG";
|
const std::string SAVEGAME_MAGIC = "VCMISVG";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user