public static RoomReset Deserialize(dynamic data) { var roomReset = new RoomReset(); if (data.MobResets != null) { Func <dynamic, MobReset> deserializeMobReset = mobResetData => MobReset.Deserialize(mobResetData); roomReset.MobResets = new List <MobReset>( Enumerable.Select(data.MobResets, deserializeMobReset)); } if (data.ItemResets != null) { Func <dynamic, ItemReset> deserializeItemReset = itemResetData => ItemReset.Deserialize(itemResetData); roomReset.ItemResets = new List <ItemReset>( Enumerable.Select(data.ItemResets, deserializeItemReset)); } return(roomReset); }
public static IDictionary <string, object> Serialize(ItemReset itemReset) { return(new Dictionary <string, object> { ["Vnum"] = itemReset.Vnum }); }