From c5225aab7010c78fdbc08fc5c8d2240a31e6061e Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 4 Apr 2023 22:22:58 +0300 Subject: [PATCH] Fix serialization --- lib/serializer/CSerializer.h | 2 +- lib/spells/CSpellHandler.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/serializer/CSerializer.h b/lib/serializer/CSerializer.h index 55593e920..ec6207511 100644 --- a/lib/serializer/CSerializer.h +++ b/lib/serializer/CSerializer.h @@ -14,7 +14,7 @@ VCMI_LIB_NAMESPACE_BEGIN -const ui32 SERIALIZATION_VERSION = 820; +const ui32 SERIALIZATION_VERSION = 821; const ui32 MINIMAL_SERIALIZATION_VERSION = 820; const std::string SAVEGAME_MAGIC = "VCMISVG"; diff --git a/lib/spells/CSpellHandler.h b/lib/spells/CSpellHandler.h index c00e40559..b2cf45f0a 100644 --- a/lib/spells/CSpellHandler.h +++ b/lib/spells/CSpellHandler.h @@ -272,6 +272,8 @@ public: template void serialize(Handler & h, const int version) { h & identifier; + if (version > 820) + h & modScope; h & id; h & level; h & power;