/// <summary> /// Setsup the mob for a test session /// </summary> private void GenerateTestItems() { Inv.AddToInventory(new Armor(9900)); Inv.AddToInventory(new Armor(9901)); Inv.AddToInventory(new Armor(9902)); Inv.AddToInventory(new Armor(9903)); Inv.AddToInventory(new Ring(9940)); Inv.AddToInventory(new Weapon(9950)); foreach (ItemBase item in Inv.InventoryList) { item.CreateBaseItem(Program.conn.ConnectionString, $"{Program.dbo}.ItemConfig"); } foreach (Armor item in GetInventoryItems <Armor>()) { EquipItem(item); } EquipItem(Inv.InventoryList.Find(x => x.ItemId == 9940), 1); EquipItem(Inv.InventoryList.Find(x => x.ItemId == 9950), 1); }
/// <summary> /// Adds an item to the inventory /// </summary> /// <param name="item">Item to add.</param> public void AddItemToInventory(ItemBase item) { Inv.AddToInventory(item); }