mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Minor fixes
This commit is contained in:
@ -72,7 +72,18 @@ void CCastleEvent::serializeJson(JsonSerializeFormat & handler)
|
||||
{
|
||||
CMapEvent::serializeJson(handler);
|
||||
|
||||
handler.serializeIdArray("buildings", buildings);
|
||||
// TODO: handler.serializeIdArray("buildings", buildings);
|
||||
{
|
||||
std::vector<BuildingID> temp(buildings.begin(), buildings.end());
|
||||
auto a = handler.enterArray("buildings");
|
||||
a.syncSize(temp);
|
||||
for(int i = 0; i < temp.size(); ++i)
|
||||
{
|
||||
a.serializeInt(i, temp[i]);
|
||||
buildings.insert(temp[i]);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto a = handler.enterArray("creatures");
|
||||
a.syncSize(creatures);
|
||||
|
Reference in New Issue
Block a user