From 640460dad41709070228edd8e2e977e3f3b34583 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 3 Nov 2024 19:55:37 +0000 Subject: [PATCH] Fixed scav exfiltration from location failing due to client profile data being in different format --- project/src/callbacks/InraidCallbacks.ts | 2 +- project/src/controllers/InraidController.ts | 10 +++++----- project/src/models/eft/inRaid/IScavSaveRequestData.ts | 7 +------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/project/src/callbacks/InraidCallbacks.ts b/project/src/callbacks/InraidCallbacks.ts index 1ff6e079..bf2a4a55 100644 --- a/project/src/callbacks/InraidCallbacks.ts +++ b/project/src/callbacks/InraidCallbacks.ts @@ -30,7 +30,7 @@ export class InraidCallbacks { } /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * @param url * @param info Save progress request * @param sessionID Session id diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index b8efa113..2098f1c3 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -55,19 +55,19 @@ export class InraidController { } /** - * Handle raid/profile/save + * Handle raid/profile/scavsave * Save profile state to disk * Handles pmc/pscav - * @param offraidData post-raid request data + * @param offraidProfileData Post-raid scav profile data * @param sessionID Session id */ - public savePostRaidProfileForScav(offraidData: IScavSaveRequestData, sessionID: string): void { + public savePostRaidProfileForScav(offraidProfileData: IScavSaveRequestData, sessionID: string): void { const serverScavProfile = this.profileHelper.getScavProfile(sessionID); // 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; + if (serverScavProfile.Inventory.equipment === offraidProfileData.Inventory.equipment) { + serverScavProfile.Inventory.items = offraidProfileData.Inventory.items; } } diff --git a/project/src/models/eft/inRaid/IScavSaveRequestData.ts b/project/src/models/eft/inRaid/IScavSaveRequestData.ts index 7ea11bc3..cf08a2f4 100644 --- a/project/src/models/eft/inRaid/IScavSaveRequestData.ts +++ b/project/src/models/eft/inRaid/IScavSaveRequestData.ts @@ -1,8 +1,3 @@ import { IPostRaidPmcData } from "@spt/models/eft/common/IPmcData"; -import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { IInsuredItemsData } from "@spt/models/eft/inRaid/IInsuredItemsData"; -import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState"; -export interface IScavSaveRequestData { - profile: IPostRaidPmcData; -} +export interface IScavSaveRequestData extends IPostRaidPmcData {}