public Item_JSON ToItem_JSON() { Item_JSON it = new Item_JSON(); it.ID = this.ID; it.Name = this.Name; it.Value = this.Value; it.Price = this.Price; it.MaxStackSize = this.MaxStackSize; it.Description = this.Description; it.Slug = this.Slug; it.EquipTag = this.EquipTag.ToString(); if (this.EID != null) { it.EID = this.EID.ToExtraItemData_JSON(); } return(it); }
public static Item Item_JSON_to_Item(Item_JSON it) { ExtraItemData new_eid = new ExtraItemData(); if (it.EID != null) { new_eid.JSON_To_ExtraItemData(it.EID); } Item newItem = new Item( it.ID, it.Name, it.Value, it.Price, it.MaxStackSize, it.Description, it.Slug, it.EquipTag, new_eid ); return(newItem); }
public ItemSave(Item_JSON item, int count) { this.item = item; this.count = count; }