From 22f729a3fe7fc4b6f3aaf4c24953e62aa7811849 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Sun, 4 Sep 2016 13:43:09 +0300 Subject: [PATCH] CPlayerState serialize fix. --- lib/CPlayerState.h | 9 ++++++++- lib/Connection.h | 2 +- lib/VCMI_lib.cbp | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/CPlayerState.h b/lib/CPlayerState.h index 3469b1304..f5074e371 100644 --- a/lib/CPlayerState.h +++ b/lib/CPlayerState.h @@ -43,7 +43,14 @@ public: { h & color & human & team & resources & status; h & heroes & towns & availableHeroes & dwellings & quests & visitedObjects; - h & getBonusList(); //FIXME FIXME FIXME + + if(version < 760) + { + //was: h & getBonusList(); + BonusList junk; + h & junk; + } + h & status & daysWithoutCastle; h & enteredLosingCheatCode & enteredWinningCheatCode; h & static_cast(*this); diff --git a/lib/Connection.h b/lib/Connection.h index 28c7cedf9..307de34dd 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 = 759; +const ui32 version = 760; const ui32 minSupportedVersion = 753; class CISer; diff --git a/lib/VCMI_lib.cbp b/lib/VCMI_lib.cbp index a44653ae6..9498912d5 100644 --- a/lib/VCMI_lib.cbp +++ b/lib/VCMI_lib.cbp @@ -162,6 +162,7 @@ +