Improved getTotalStackCountSize

(cherry picked from commit bd5e7b1e62e86b426392d6be4c209c8b9e45095f)
This commit is contained in:
Dev 2024-07-17 20:17:12 +01:00
parent f406918bb8
commit 3f7f357bff

View File

@ -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;
}
}