public static EquippedItemsSave Save(EquippedItems items) { EquippedItemsSave save = new EquippedItemsSave(); save.Helmet = ItemSave.Save(items.Helmet); save.Chestplate = ItemSave.Save(items.Chestplate); save.Leggings = ItemSave.Save(items.Leggings); save.Boots = ItemSave.Save(items.Boots); save.Weapon = ItemSave.Save(items.Weapon); return(save); }
public static InventorySave Save(Inventory inventory) { InventorySave inventorySave = new InventorySave(); inventorySave.Items = new List <ItemSave>(); foreach (Item item in inventory.Items) { inventorySave.Items.Add(ItemSave.Save(item)); } inventorySave.EquippedItems = EquippedItemsSave.Save(inventory.EquippedItems); return(inventorySave); }