From 655c0d9f27a1c0ce7c66eddc9465dc06500b9fc7 Mon Sep 17 00:00:00 2001 From: Kaeno <> Date: Fri, 23 Aug 2024 23:50:52 +0100 Subject: [PATCH] Add check to only replace items if equipment id matches. Preventing from profile breaking --- project/src/controllers/InraidController.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index 803a8901..b8efa113 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -64,7 +64,11 @@ export class InraidController { public savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void { const serverScavProfile = this.profileHelper.getScavProfile(sessionID); - serverScavProfile.Inventory.items = offraidData.profile.Inventory.items; + // If equipment match overwrite existing data from update to date raid data for scavenger screen to work correctly. + // otherwise Scav inventory will be overwritten and break scav regeneration breaking profile. + if (serverScavProfile.Inventory.equipment === offraidData.profile.Inventory.equipment) { + serverScavProfile.Inventory.items = offraidData.profile.Inventory.items; + } } /**