diff --git a/config/schemas/spell.json b/config/schemas/spell.json index 32abd5072..e63ef3a84 100644 --- a/config/schemas/spell.json +++ b/config/schemas/spell.json @@ -12,6 +12,10 @@ "type": "array", "items":{ "anyOf":[ + { + //dummy animation, pause, Value - frame count + "type": "number" + }, { //assumed verticalPosition: top "type": "string", diff --git a/lib/Connection.h b/lib/Connection.h index 128485841..c526c54b9 100644 --- a/lib/Connection.h +++ b/lib/Connection.h @@ -27,8 +27,8 @@ #include "mapping/CCampaignHandler.h" //for CCampaignState #include "rmg/CMapGenerator.h" // for CMapGenOptions -const ui32 version = 753; -const ui32 minSupportedVersion = version; +const ui32 version = 754; +const ui32 minSupportedVersion = 753; class CISer; class COSer; diff --git a/lib/spells/CSpellHandler.cpp b/lib/spells/CSpellHandler.cpp index d990bea7e..a396231d9 100644 --- a/lib/spells/CSpellHandler.cpp +++ b/lib/spells/CSpellHandler.cpp @@ -970,6 +970,11 @@ CSpell * CSpellHandler::loadFromJson(const JsonNode & json) if("bottom" == vPosStr) newItem.verticalPosition = VerticalPosition::BOTTOM; } + else if(item.getType() == JsonNode::DATA_FLOAT) + { + newItem.pause = item.Float(); + } + q.push_back(newItem); } }; diff --git a/lib/spells/CSpellHandler.h b/lib/spells/CSpellHandler.h index efdd52f38..4593f4b5f 100644 --- a/lib/spells/CSpellHandler.h +++ b/lib/spells/CSpellHandler.h @@ -104,10 +104,19 @@ public: { std::string resourceName; VerticalPosition verticalPosition; + int pause; template void serialize(Handler & h, const int version) { h & resourceName & verticalPosition; + if(version >= 754) + { + h & pause; + } + else if(!h.saving) + { + pause = 0; + } } };