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:
@ -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
|
||||
|
Reference in New Issue
Block a user