Fixed error on purchasing items after a raid

This commit is contained in:
Dev 2024-11-01 14:54:08 +00:00
parent 8e3ee3f30e
commit 5ec265d9bd
2 changed files with 3 additions and 3 deletions

View File

@ -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(

View File

@ -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