Delete all quest items from server profile prior to adding them from the client copy

This commit is contained in:
Dev 2024-11-04 16:00:16 +00:00
parent 3baf2231ee
commit 7b62ad5eac

View File

@ -64,9 +64,12 @@ export class InRaidHelper {
// Store insurance (as removeItem() removes insured items) // Store insurance (as removeItem() removes insured items)
const insured = this.cloner.clone(serverProfile.InsuredItems); 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); 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) // 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( const postRaidInventoryItems = this.itemHelper.findAndReturnChildrenAsItems(
postRaidProfile.Inventory.items, postRaidProfile.Inventory.items,