Skip to content

Commit 80f4a95

Browse files
authored
chore: (Day) Don't mark the same bag for update multiple times in giveItem (AscensionGameDev#2083)
1 parent a582d47 commit 80f4a95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Intersect.Server.Core/Entities/Player.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,10 @@ private void GiveItem(Item item, int destSlot, bool sendUpdate, BagSlot[]? bagSl
26672667
bagSlot.Quantity += insertableQuantity;
26682668
remainingQuantity -= insertableQuantity;
26692669

2670-
bagsUpdated.Add(bagSlot.ParentBag);
2670+
if (!bagsUpdated.Contains(bagSlot.ParentBag))
2671+
{
2672+
bagsUpdated.Add(bagSlot.ParentBag);
2673+
}
26712674
}
26722675

26732676
foreach (var bagUpdated in bagsUpdated)

0 commit comments

Comments
 (0)