Add check to only replace items if equipment id matches. Preventing from profile breaking
This commit is contained in:
parent
ec3eba0991
commit
655c0d9f27
@ -64,8 +64,12 @@ export class InraidController {
|
||||
public savePostRaidProfileForScav(offraidData: 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the inraid config from configs/inraid.json
|
||||
|
Loading…
x
Reference in New Issue
Block a user