diff --git a/Libraries/Core/Controllers/InventoryController.cs b/Libraries/Core/Controllers/InventoryController.cs index fd6ca60f..6a4b1978 100644 --- a/Libraries/Core/Controllers/InventoryController.cs +++ b/Libraries/Core/Controllers/InventoryController.cs @@ -440,14 +440,14 @@ public class InventoryController( // Remove kvp from requested fast panel index // TODO - does this work - pmcData.Inventory.FastPanel.Remove(request.Index.ToString()); + pmcData.Inventory.FastPanel.Remove(request.Index); } public void BindItem(PmcData pmcData, InventoryBindRequestData bindRequest, string sessionId, ItemEventRouterResponse output) { foreach (var kvp in pmcData.Inventory.FastPanel - .Where(kvp => kvp.Value == bindRequest.Index.Value.ToString())) + .Where(kvp => kvp.Value == bindRequest.Index)) { pmcData.Inventory.FastPanel.Remove(kvp.Key); @@ -455,7 +455,7 @@ public class InventoryController( } // Create link between fast panel slot and requested item - pmcData.Inventory.FastPanel[bindRequest.Index.ToString()] = bindRequest.Item; + pmcData.Inventory.FastPanel[bindRequest.Index] = bindRequest.Item; } public ItemEventRouterResponse TagItem(PmcData pmcData, InventoryTagRequestData request, string sessionId) @@ -764,7 +764,7 @@ public class InventoryController( return; } - var profileToRemoveItemFrom = request?.FromOwner.Id == pmcData.Id + var profileToRemoveItemFrom = request.FromOwner is null || request.FromOwner?.Id == pmcData.Id ? pmcData : _profileHelper.GetFullProfile(sessionId).CharacterData.ScavData; diff --git a/Libraries/Core/Models/Eft/Inventory/InventoryBindRequestData.cs b/Libraries/Core/Models/Eft/Inventory/InventoryBindRequestData.cs index e09deb47..10717375 100644 --- a/Libraries/Core/Models/Eft/Inventory/InventoryBindRequestData.cs +++ b/Libraries/Core/Models/Eft/Inventory/InventoryBindRequestData.cs @@ -8,5 +8,5 @@ public record InventoryBindRequestData : InventoryBaseActionRequestData public string? Item { get; set; } [JsonPropertyName("index")] - public int? Index { get; set; } + public string? Index { get; set; } }