Improved getTotalStackCountSize

This commit is contained in:
Dev 2024-07-17 20:17:12 +01:00
parent 4b8b3b77a7
commit bd5e7b1e62

View File

@ -370,12 +370,10 @@ export class RagfairOfferHelper
let total = 0; let total = 0;
for (const itemAndChildren of itemsInInventoryToList) 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 += rootItem.upd?.StackObjectsCount ?? 1;
{
total += item.upd?.StackObjectsCount ?? 1;
}
} }
} }