From 5d59bbc0d4fd80cc14deba7de0c0f26016dc4e1c Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Mon, 22 Dec 2014 11:56:53 +0300 Subject: [PATCH] Fix CGBonusingObject serialization Now state of adventure map objects that use this handler will be saved properly and they'll work as indended after save loaded. Affect following objects: Buoy, Swan Pond, Faerie Ring, etc. --- lib/Connection.h | 2 +- lib/mapObjects/CRewardableObject.h | 2 +- lib/registerTypes/RegisterTypes.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Connection.h b/lib/Connection.h index ddcebc062..e4aaefe07 100644 --- a/lib/Connection.h +++ b/lib/Connection.h @@ -27,7 +27,7 @@ #include "mapping/CCampaignHandler.h" //for CCampaignState #include "rmg/CMapGenerator.h" // for CMapGenOptions -const ui32 version = 750; +const ui32 version = 751; const ui32 minSupportedVersion = version; class CConnection; diff --git a/lib/mapObjects/CRewardableObject.h b/lib/mapObjects/CRewardableObject.h index 163890e6a..2d7765a69 100644 --- a/lib/mapObjects/CRewardableObject.h +++ b/lib/mapObjects/CRewardableObject.h @@ -269,7 +269,7 @@ public: template void serialize(Handler &h, const int version) { - h & static_cast(*this); + h & static_cast(*this); } }; diff --git a/lib/registerTypes/RegisterTypes.h b/lib/registerTypes/RegisterTypes.h index d9e4b6f72..7430e8aa7 100644 --- a/lib/registerTypes/RegisterTypes.h +++ b/lib/registerTypes/RegisterTypes.h @@ -38,7 +38,6 @@ void registerTypesMapObjects1(Serializer &s) s.template registerType(); s.template registerType(); s.template registerType(); - s.template registerType(); s.template registerType(); s.template registerType(); s.template registerType(); @@ -142,6 +141,7 @@ void registerTypesMapObjects2(Serializer &s) s.template registerType(); s.template registerType(); + s.template registerType(); s.template registerType(); s.template registerType(); s.template registerType();