Protect against a missing upd object inside changeItemStack()

This commit is contained in:
Dev 2023-10-10 22:37:38 +01:00
parent 57dbfb36f7
commit 68a8d34489

View File

@ -501,6 +501,10 @@ export class QuestHelper
if (newStackSize > 0)
{
const item = pmcData.Inventory.items[inventoryItemIndex];
if (!item.upd)
{
item.upd = {};
}
item.upd.StackObjectsCount = newStackSize;
this.addItemStackSizeChangeIntoEventResponse(output, sessionID, item);