From bd5e7b1e62e86b426392d6be4c209c8b9e45095f Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 17 Jul 2024 20:17:12 +0100 Subject: [PATCH] Improved getTotalStackCountSize --- project/src/helpers/RagfairOfferHelper.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/project/src/helpers/RagfairOfferHelper.ts b/project/src/helpers/RagfairOfferHelper.ts index 7805d506..8ad958c2 100644 --- a/project/src/helpers/RagfairOfferHelper.ts +++ b/project/src/helpers/RagfairOfferHelper.ts @@ -370,12 +370,10 @@ export class RagfairOfferHelper let total = 0; for (const itemAndChildren of itemsInInventoryToList) { - for (const item of itemAndChildren) + // Only count the root items stack count in total + const rootItem = itemAndChildren[0]; { - if (item.slotId === "hideout") - { - total += item.upd?.StackObjectsCount ?? 1; - } + total += rootItem.upd?.StackObjectsCount ?? 1; } }