From 026ff4d9291e4d635738f16b45e896d9645bbb1d Mon Sep 17 00:00:00 2001 From: Kaeno <> Date: Wed, 4 Sep 2024 23:01:33 +0100 Subject: [PATCH] Make scav regenerate later after death to not persist old data, causing stale kills to appear on death. --- project/src/services/LocationLifecycleService.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index d60b6f19..3048f888 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -382,14 +382,9 @@ export class LocationLifecycleService { isDead: boolean, request: IEndLocalRaidRequestData, ): void { - // Scav died, regen scav loadout and reset timer - if (isDead) { - this.playerScavGenerator.generate(sessionId); - } - scavProfile.Info.Level = request.results.profile.Info.Level; scavProfile.Skills = request.results.profile.Skills; - scavProfile.Stats.Eft = request.results.profile.Stats.Eft; + scavProfile.Stats = request.results.profile.Stats; scavProfile.Encyclopedia = request.results.profile.Encyclopedia; scavProfile.TaskConditionCounters = request.results.profile.TaskConditionCounters; scavProfile.SurvivorClass = request.results.profile.SurvivorClass; @@ -418,6 +413,11 @@ export class LocationLifecycleService { // Remove skill fatigue values this.resetSkillPointsEarnedDuringRaid(scavProfile.Skills.Common); + // Scav died, regen scav loadout and reset timer + if (isDead) { + this.playerScavGenerator.generate(sessionId); + } + // Update last played property pmcProfile.Info.LastTimePlayedAsSavage = this.timeUtil.getTimestamp();