Added check for stack count below 1 and resets to 1 when handling single items being passed into unstackOfferItems()

(cherry picked from commit 78f6fad21b)
This commit is contained in:
Dev 2024-07-18 09:19:44 +01:00
parent 665778eaf1
commit 5447203bf4

View File

@ -310,6 +310,12 @@ export class RagfairOfferService
// Items within stack tolerance, return existing data - no changes needed
if (totalItemCount <= itemMaxStackSize)
{
// Edge case - Ensure items stack count isnt < 1
if (items[0]?.upd?.StackObjectsCount < 1)
{
items[0].upd.StackObjectsCount = 1;
}
return items;
}