Browse Source

Save compatibility with main branch

Ivan Savenko 2 years ago
parent
commit
063b8732ff
4 changed files with 10 additions and 6 deletions
  1. 1 1
      config/spells/other.json
  2. 6 3
      lib/ObstacleHandler.h
  3. 1 1
      lib/serializer/CSerializer.h
  4. 2 1
      lib/spells/CSpellHandler.h

+ 1 - 1
config/spells/other.json

@@ -57,7 +57,7 @@
 		"targetType" : "NO_TARGET",
 
 		"sounds": {
-			"cast": "", // no casting sound, only obstacle placement sound
+			"cast": "" // no casting sound, only obstacle placement sound
 		},
 		"levels" : {
 			"base":{

+ 6 - 3
lib/ObstacleHandler.h

@@ -61,10 +61,13 @@ public:
 		h & iconIndex;
 		h & identifier;
 		h & animation;
-		h & appearSound;
 		h & appearAnimation;
-		h & triggerSound;
-		h & triggerAnimation;
+		if (version > 805)
+		{
+			h & appearSound;
+			h & triggerAnimation;
+			h & triggerSound;
+		}
 		h & allowedTerrains;
 		h & allowedSpecialBfields;
 		h & isAbsoluteObstacle;

+ 1 - 1
lib/serializer/CSerializer.h

@@ -14,7 +14,7 @@
 
 VCMI_LIB_NAMESPACE_BEGIN
 
-const ui32 SERIALIZATION_VERSION = 805;
+const ui32 SERIALIZATION_VERSION = 806;
 const ui32 MINIMAL_SERIALIZATION_VERSION = 805;
 const std::string SAVEGAME_MAGIC = "VCMISVG";
 

+ 2 - 1
lib/spells/CSpellHandler.h

@@ -85,7 +85,8 @@ public:
 		template <typename Handler> void serialize(Handler & h, const int version)
 		{
 			h & resourceName;
-			h & effectName;
+			if (version > 805)
+				h & effectName;
 			h & verticalPosition;
 			h & pause;
 		}