diff --git a/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs b/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs index 2f9eafcc..05ba55f4 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotInventoryContainerService.cs @@ -80,9 +80,11 @@ public class BotInventoryContainerService(ISptLogger logger, // Try to fit item into one of the containers' grids var rootItem = itemAndChildren.FirstOrDefault(); - var gridIndex = 0; + var gridIndex = -1; foreach (var gridDb in containerDetails.ContainerDbItem.Properties.Grids) { + gridIndex++; + var gridDetails = containerDetails.ContainerGridDetails[gridIndex]; if (gridDetails.GridFull) { @@ -133,8 +135,6 @@ public class BotInventoryContainerService(ISptLogger logger, break; } - gridIndex++; - // Didn't fit, flag as no space, hopefully next grid has space addResult = ItemAddedResult.NO_SPACE;