public void PutTempItemsInInventory(InventoryBase inventory) { foreach (var item in itemsToSort) { inventory.Add(null, item.itemDefinition, item.propertySet, item.amount, 0); item.propertySet.Clear(); } itemsToSort.Clear(); }