mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Fix loading saved games (add ESerializationVersion)
This commit is contained in:
parent
05bbb45824
commit
ff35a27176
@ -105,6 +105,11 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
|
||||
h & updater;
|
||||
h & propagationUpdater;
|
||||
h & targetSourceType;
|
||||
if (h.version < Handler::Version::MANA_LIMIT && type == BonusType::MANA_PER_KNOWLEDGE_PERCENTAGE)
|
||||
{
|
||||
if (valType == BonusValueType::ADDITIVE_VALUE || valType == BonusValueType::BASE_NUMBER)
|
||||
val *= 100;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Ptr>
|
||||
|
@ -37,6 +37,7 @@ enum class ESerializationVersion : int32_t
|
||||
DESTROYED_OBJECTS, // 834 +list of objects destroyed by player
|
||||
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
|
||||
|
||||
CURRENT = JSON_FLAGS
|
||||
CURRENT = MANA_LIMIT
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user