Replaced single loop with key lookup inside BindItem
This commit is contained in:
@@ -610,11 +610,10 @@ public class InventoryController(
|
||||
public void BindItem(PmcData pmcData, InventoryBindRequestData bindRequest, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
foreach (var kvp in pmcData.Inventory.FastPanel.Where(kvp => kvp.Value == bindRequest.Index))
|
||||
// Remove link
|
||||
if (pmcData.Inventory.FastPanel.ContainsKey(bindRequest.Index))
|
||||
{
|
||||
pmcData.Inventory.FastPanel.Remove(kvp.Key);
|
||||
|
||||
break;
|
||||
pmcData.Inventory.FastPanel.Remove(bindRequest.Index);
|
||||
}
|
||||
|
||||
// Create link between fast panel slot and requested item
|
||||
|
||||
Reference in New Issue
Block a user