From e917f8eec4cb0c9a26182b645410a908e64311e3 Mon Sep 17 00:00:00 2001 From: JC Snider Date: Mon, 22 Jan 2024 15:07:43 -0500 Subject: [PATCH] fix: item dupe with mismatched inventory bank stacking values (#2153) --- Intersect.Server.Core/Entities/BankInterface.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Intersect.Server.Core/Entities/BankInterface.cs b/Intersect.Server.Core/Entities/BankInterface.cs index 8dcfee3691..c4fa153063 100644 --- a/Intersect.Server.Core/Entities/BankInterface.cs +++ b/Intersect.Server.Core/Entities/BankInterface.cs @@ -418,9 +418,14 @@ out var slotIndicesToRemoveFrom break; } - var slotIndexToRemoveFrom = slotIndicesToRemoveFrom[nextSlotIndexToRemoveFrom++]; + var slotIndexToRemoveFrom = slotIndicesToRemoveFrom[nextSlotIndexToRemoveFrom]; var sourceSlot = sourceSlots[slotIndexToRemoveFrom]; + if (sourceSlot.Quantity <= maximumStack) + { + nextSlotIndexToRemoveFrom++; + } slotToFill.Set(sourceSlot); + slotToFill.Quantity = 1; remainingQuantity -= 1; continue; }