From 5ec265d9bd26f43c7b6605aef3006d63c69e9a8e Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 1 Nov 2024 14:54:08 +0000 Subject: [PATCH] Fixed error on purchasing items after a raid --- project/src/helpers/InRaidHelper.ts | 3 +-- project/src/services/PaymentService.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index 659e02a7..a78f5043 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -66,8 +66,6 @@ export class InRaidHelper { // Remove possible equipped items from before the raid this.inventoryHelper.removeItem(serverProfile, serverProfile.Inventory.equipment, sessionID); - this.inventoryHelper.removeItem(serverProfile, serverProfile.Inventory.questRaidItems, sessionID); - this.inventoryHelper.removeItem(serverProfile, serverProfile.Inventory.sortingTable, 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( @@ -95,6 +93,7 @@ export class InRaidHelper { this.itemHelper.removeSpawnedInSessionPropertyFromItems(itemsToRemovePropertyFrom); } + // Add items from client profile into server profile for (const item of postRaidInventoryItems) { // Try to find index of item to determine if we should add or replace const existingItemIndex = serverProfile.Inventory.items.findIndex( diff --git a/project/src/services/PaymentService.ts b/project/src/services/PaymentService.ts index a1e2c93f..a5b50d08 100644 --- a/project/src/services/PaymentService.ts +++ b/project/src/services/PaymentService.ts @@ -311,8 +311,9 @@ export class PaymentService { } /** + * TODO - ensure money in containers inside secure container are LAST * Get all money stacks in inventory and prioritise items in stash - * @param pmcData + * @param pmcData Player profile * @param currencyTpl * @param playerStashId Players stash id * @returns Sorting money items