From 600f4a2f50b6663c614cf43ef9155c1719ae97a3 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Sun, 19 Nov 2023 15:00:56 +0100 Subject: [PATCH] feat: map item to slot --- Server/Services/ItemObjectPoolService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Server/Services/ItemObjectPoolService.cs b/Server/Services/ItemObjectPoolService.cs index 6b190e5..69cdfbe 100644 --- a/Server/Services/ItemObjectPoolService.cs +++ b/Server/Services/ItemObjectPoolService.cs @@ -71,8 +71,18 @@ public class ItemObjectPoolService : IHostedService { ItemId = itemId, Count = count, - Slot = 0, - InventoryTab = InventoryTab.WornEquipment, + Slot = (byte)item.SlotNo1, + InventoryTab = + item.ItemType switch + { + 1 => InventoryTab.WornCashEquipment, + 2 => isWorn ? InventoryTab.WornEquipment : InventoryTab.Equipment, + 3 => InventoryTab.Etc, + 4 => isWorn ? InventoryTab.WornCashEquipment : InventoryTab.Cash, + 5 => InventoryTab.Warehouse, + 0 => InventoryTab.WornEquipment, + _ => 0 + }, Level = item.MinimumLevelRequirement, Rarity = 0, AddOption = 0,