Exemple #1
0
        public void ExtractAllItemsToTemp(InventoryBase inventory, IInventorySlots inventorySlots)
        {
            for (var i = 0; i < inventorySlots.Capacity; i++)
            {
                if (inventorySlots.TryGetSlot(i, out var inventoryItem))
                {
                    var itemTemp = new ItemTemp();
                    itemTemp.propertySet.SetStats(inventoryItem.Stats);
                    itemTemp.amount         = inventory.Remove(null, inventoryItem.Item, inventoryItem.Stats, inventoryItem.Amount, i);
                    itemTemp.itemDefinition = inventoryItem.Item;

                    itemsToSort.Add(itemTemp);
                }
            }
        }