From 7b62ad5eac9247c20d69eb39aab3256177678792 Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 4 Nov 2024 16:00:16 +0000 Subject: [PATCH] Delete all quest items from server profile prior to adding them from the client copy --- project/src/helpers/InRaidHelper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index 404b0d8f..7ac7dd60 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -64,9 +64,12 @@ export class InRaidHelper { // Store insurance (as removeItem() removes insured items) const insured = this.cloner.clone(serverProfile.InsuredItems); - // Remove equipped items from before the raid + // Remove equipment and loot items stored on player from server profile in preparation for data from client being added this.inventoryHelper.removeItem(serverProfile, serverProfile.Inventory.equipment, sessionID); + // Remove quest items stored on player from server profile in preparation for data from client being added + this.inventoryHelper.removeItem(serverProfile, serverProfile.Inventory.questRaidItems, sessionID); + // Get all items that have a parent of `serverProfile.Inventory.equipment` (All items player had on them at end of raid) const postRaidInventoryItems = this.itemHelper.findAndReturnChildrenAsItems( postRaidProfile.Inventory.items,