diff --git a/lib/mapObjects/CArmedInstance.cpp b/lib/mapObjects/CArmedInstance.cpp index b9d65c791..b7c2aafa7 100644 --- a/lib/mapObjects/CArmedInstance.cpp +++ b/lib/mapObjects/CArmedInstance.cpp @@ -135,10 +135,10 @@ CBonusSystemNode * CArmedInstance::whatShouldBeAttached() void CArmedInstance::writeJsonOptions(JsonNode& json) const { - CCreatureSet::writeJson(json["army"]); + CGObjectInstance::writeJsonOptions(json); } void CArmedInstance::readJsonOptions(const JsonNode& json) { - CCreatureSet::readJson(json["army"]); + CGObjectInstance::readJsonOptions(json); } diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index 18f9cf2ba..bd055ff90 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -1472,14 +1472,14 @@ bool CGHeroInstance::hasVisions(const CGObjectInstance * target, const int subty void CGHeroInstance::writeJsonOptions(JsonNode& json) const { - CArmedInstance::writeJsonOptions(json); + CCreatureSet::writeJson(json["army"]); CGObjectInstance::writeOwner(json); CArtifactSet::writeJson(json["artifacts"]); } void CGHeroInstance::readJsonOptions(const JsonNode& json) { - CArmedInstance::readJsonOptions(json); + CCreatureSet::readJson(json["army"]); CGObjectInstance::readOwner(json); CArtifactSet::readJson(json["artifacts"]); } diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index c8550183b..2ce4872b9 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -792,7 +792,7 @@ void CGMine::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) con void CGMine::writeJsonOptions(JsonNode & json) const { - CArmedInstance::writeJsonOptions(json); + CCreatureSet::writeJson(json["army"]); if(isAbandoned()) { @@ -814,7 +814,7 @@ void CGMine::writeJsonOptions(JsonNode & json) const void CGMine::readJsonOptions(const JsonNode & json) { - CArmedInstance::readJsonOptions(json); + CCreatureSet::readJson(json["army"]); if(isAbandoned()) { @@ -1874,14 +1874,14 @@ void CGGarrison::battleFinished(const CGHeroInstance *hero, const BattleResult & void CGGarrison::writeJsonOptions(JsonNode& json) const { - CArmedInstance::writeJsonOptions(json); + CCreatureSet::writeJson(json["army"]); CGObjectInstance::writeOwner(json); json["removableUnits"].Bool() = removableUnits; } void CGGarrison::readJsonOptions(const JsonNode& json) { - CArmedInstance::readJsonOptions(json); + CCreatureSet::readJson(json["army"]); CGObjectInstance::readOwner(json); removableUnits = json["removableUnits"].Bool(); }