1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Seerhut works as rewardable object

This commit is contained in:
nordsoft
2023-09-15 10:06:06 +02:00
parent 574047c55c
commit 06f01c3b82
13 changed files with 183 additions and 26 deletions

View File

@ -19,6 +19,7 @@
#include "VCMI_Lib.h"
#include "mapObjectConstructors/CObjectClassesHandler.h"
#include "spells/CSpellHandler.h"
#include "serializer/JsonSerializeFormat.h"
VCMI_LIB_NAMESPACE_BEGIN
@ -385,4 +386,14 @@ void MetaString::jsonDeserialize(const JsonNode & source)
numbers.push_back(entry.Integer());
}
void MetaString::serializeJson(JsonSerializeFormat & handler)
{
JsonNode attr;
if(handler.saving)
jsonSerialize(attr);
handler.serializeRaw("attributes", attr, std::nullopt);
if(!handler.saving)
jsonDeserialize(attr);
}
VCMI_LIB_NAMESPACE_END