From 967330132fab51ead44c481931b41ec82e592baa Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 24 Nov 2024 18:33:23 +0000 Subject: [PATCH] Formatting changes --- project/src/services/LocationLifecycleService.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index 08c10d11..c14d48c6 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -639,8 +639,8 @@ export class LocationLifecycleService { const postRaidProfile = request.results.profile; const preRaidProfileQuestDataClone = this.cloner.clone(pmcProfile.Quests); - // MUST occur BEFORE inventory actions occur - // Player died, quest items presist in the post raid profile + // MUST occur BEFORE inventory actions (setInventory()) occur + // Player died, get quest items they lost for use later const lostQuestItems = this.profileHelper.getQuestItemsInProfile(postRaidProfile); // Update inventory @@ -655,12 +655,6 @@ export class LocationLifecycleService { pmcProfile.Achievements = postRaidProfile.Achievements; pmcProfile.Quests = this.processPostRaidQuests(postRaidProfile.Quests); - if (isDead && lostQuestItems.length > 0) { - // MUST occur AFTER quests have post raid quest data has been merged - // Player is dead + had quest items, check and fix any broken find item quests - this.checkForAndFixPickupQuestsAfterDeath(sessionId, lostQuestItems, pmcProfile.Quests); - } - // Handle edge case - must occur AFTER processPostRaidQuests() this.lightkeeperQuestWorkaround(sessionId, postRaidProfile.Quests, preRaidProfileQuestDataClone, pmcProfile); @@ -692,6 +686,12 @@ export class LocationLifecycleService { this.healthHelper.updateProfileHealthPostRaid(pmcProfile, postRaidProfile.Health, sessionId, isDead); if (isDead) { + if (lostQuestItems.length > 0) { + // MUST occur AFTER quests have post raid quest data has been merged "processPostRaidQuests()" + // Player is dead + had quest items, check and fix any broken find item quests + this.checkForAndFixPickupQuestsAfterDeath(sessionId, lostQuestItems, pmcProfile.Quests); + } + this.pmcChatResponseService.sendKillerResponse(sessionId, pmcProfile, postRaidProfile.Stats.Eft.Aggressor); this.inRaidHelper.deleteInventory(pmcProfile, sessionId);