Improved getTotalStackCountSize
This commit is contained in:
parent
4b8b3b77a7
commit
bd5e7b1e62
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user