From 9d923a8b0e9be47d6ee92ae66555649db94b8d71 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 3 Sep 2024 18:38:32 +0100 Subject: [PATCH] Fixed `Exhaustion` effect persisting after raid --- project/src/helpers/HealthHelper.ts | 10 ++++++++++ project/src/services/LocationLifecycleService.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/project/src/helpers/HealthHelper.ts b/project/src/helpers/HealthHelper.ts index ad55b36b..214b3939 100644 --- a/project/src/helpers/HealthHelper.ts +++ b/project/src/helpers/HealthHelper.ts @@ -148,6 +148,16 @@ export class HealthHelper { // Already exists on server profile, skip const profileBodyPartEffects = profileData.Health.BodyParts[bodyPartId].Effects; if (profileBodyPartEffects[effect]) { + if (effect === "Exhaustion") { + // Get rid of existing Exhaustion effect + profileBodyPartEffects[effect] = undefined; + } + + continue; + } + + if (effect === "Exhaustion") { + // Do not pass exhaustion to out of raid profile continue; } diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index 39677e05..25beb059 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -505,6 +505,7 @@ export class LocationLifecycleService { /** * Convert post-raid quests into correct format + * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 * @param questsToProcess * @returns IQuestStatus */