public override void Add(PBEItem item, ushort quantity = 1) { if (quantity == 0) { throw new ArgumentOutOfRangeException(nameof(quantity), "Quantity must be at least one."); } ItemPouchType pt = ItemData.GetPouchType(item); InventoryPouch <InventorySlotNew> pouch = this[pt]; InventorySlotNew slot = pouch[item]; if (slot == null) { pouch.Add(new InventorySlotNew(item, quantity)); } else { slot.Add(quantity); } }
public bool TryGetValue(ItemPouchType key, out InventoryPouch <T> value) { return(_pouches.TryGetValue(key, out value)); }