Fixed bug in MailSendService.processItemsBeforeAddingToMail

- Fixed bug where some items that were at the root of sent items wouldn't have their slotIds changed to "main", which resulted in people not being able to receive them
This commit is contained in:
TheSparta 2024-04-03 01:08:49 +01:00 committed by Refringe
parent d1e857a408
commit 2dfb5f63f0
No known key found for this signature in database
GPG Key ID: 7715B85B4A6306ED

View File

@ -455,7 +455,7 @@ export class MailSendService
} }
// Ensure every 'base/root' item has the same parentId + has a slotid of 'main' // Ensure every 'base/root' item has the same parentId + has a slotid of 'main'
if (!("slotId" in reward) || reward.slotId === "hideout") if (!("slotId" in reward) || reward.slotId === "hideout" || reward.parentId === parentItem.parentId)
{ {
// Reward items NEED a parent id + slotid // Reward items NEED a parent id + slotid
reward.parentId = parentItem.parentId; reward.parentId = parentItem.parentId;