diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index 09e54094c..cf20f6283 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -941,15 +941,18 @@ void CGResource::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer) void CGResource::writeJsonOptions(JsonNode& json) const { - + CCreatureSet::writeJson(json["guards"]); + json["amount"].Float() = amount; + json["guardMessage"].String() = message; } void CGResource::readJsonOptions(const JsonNode& json) { - + CCreatureSet::readJson(json["guards"]); + amount = json["amount"].Float(); + message = json["guardMessage"].String(); } - CGTeleport::CGTeleport() : type(UNKNOWN), channel(TeleportChannelID()) {