|
@@ -275,6 +275,12 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+CGEvent::CGEvent(IGameInfoCallback * cb)
|
|
|
|
|
+ : CGPandoraBox(cb)
|
|
|
|
|
+ , availableFor(PlayerColor::ALL_PLAYERS().begin(), PlayerColor::ALL_PLAYERS().end())
|
|
|
|
|
+{
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void CGEvent::init()
|
|
void CGEvent::init()
|
|
|
{
|
|
{
|
|
|
blockVisit = false;
|
|
blockVisit = false;
|
|
@@ -333,7 +339,8 @@ void CGEvent::serializeJsonOptions(JsonSerializeFormat & handler)
|
|
|
handler.serializeBool("aIActivable", computerActivate, false);
|
|
handler.serializeBool("aIActivable", computerActivate, false);
|
|
|
handler.serializeBool("humanActivable", humanActivate, true);
|
|
handler.serializeBool("humanActivable", humanActivate, true);
|
|
|
handler.serializeBool("removeAfterVisit", removeAfterVisit, false);
|
|
handler.serializeBool("removeAfterVisit", removeAfterVisit, false);
|
|
|
- handler.serializeIdArray("availableFor", availableFor);
|
|
|
|
|
|
|
+ if (handler.saving || !handler.getCurrent()["availableFor"].isNull())
|
|
|
|
|
+ handler.serializeIdArray("availableFor", availableFor); // else - keep default value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|
|
VCMI_LIB_NAMESPACE_END
|