mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Add save compatibility check
This commit is contained in:
parent
42616cf4e8
commit
50e8d1fd82
@ -93,7 +93,15 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
|
||||
h & source;
|
||||
h & val;
|
||||
h & sid;
|
||||
h & description;
|
||||
if (h.version < Handler::Version::BONUS_META_STRING)
|
||||
{
|
||||
std::string oldDescription;
|
||||
h & oldDescription;
|
||||
description = MetaString::createFromRawString(oldDescription);
|
||||
}
|
||||
else
|
||||
h & description;
|
||||
|
||||
h & additionalInfo;
|
||||
h & turnsRemain;
|
||||
h & valType;
|
||||
|
@ -38,6 +38,7 @@ enum class ESerializationVersion : int32_t
|
||||
CAMPAIGN_MAP_TRANSLATIONS, // 835 +campaigns include translations for its maps
|
||||
JSON_FLAGS, // 836 json uses new format for flags
|
||||
MANA_LIMIT, // 837 change MANA_PER_KNOWLEGDE to percentage
|
||||
BONUS_META_STRING, // 838 bonuses use MetaString instead of std::string for descriptions
|
||||
|
||||
CURRENT = MANA_LIMIT
|
||||
CURRENT = BONUS_META_STRING
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user