Skip to content

Commit 9673301

Browse files
author
Chomp
committed
Formatting changes
1 parent effcc37 commit 9673301

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

project/src/services/LocationLifecycleService.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ export class LocationLifecycleService {
639639
const postRaidProfile = request.results.profile;
640640
const preRaidProfileQuestDataClone = this.cloner.clone(pmcProfile.Quests);
641641

642-
// MUST occur BEFORE inventory actions occur
643-
// Player died, quest items presist in the post raid profile
642+
// MUST occur BEFORE inventory actions (setInventory()) occur
643+
// Player died, get quest items they lost for use later
644644
const lostQuestItems = this.profileHelper.getQuestItemsInProfile(postRaidProfile);
645645

646646
// Update inventory
@@ -655,12 +655,6 @@ export class LocationLifecycleService {
655655
pmcProfile.Achievements = postRaidProfile.Achievements;
656656
pmcProfile.Quests = this.processPostRaidQuests(postRaidProfile.Quests);
657657

658-
if (isDead && lostQuestItems.length > 0) {
659-
// MUST occur AFTER quests have post raid quest data has been merged
660-
// Player is dead + had quest items, check and fix any broken find item quests
661-
this.checkForAndFixPickupQuestsAfterDeath(sessionId, lostQuestItems, pmcProfile.Quests);
662-
}
663-
664658
// Handle edge case - must occur AFTER processPostRaidQuests()
665659
this.lightkeeperQuestWorkaround(sessionId, postRaidProfile.Quests, preRaidProfileQuestDataClone, pmcProfile);
666660

@@ -692,6 +686,12 @@ export class LocationLifecycleService {
692686
this.healthHelper.updateProfileHealthPostRaid(pmcProfile, postRaidProfile.Health, sessionId, isDead);
693687

694688
if (isDead) {
689+
if (lostQuestItems.length > 0) {
690+
// MUST occur AFTER quests have post raid quest data has been merged "processPostRaidQuests()"
691+
// Player is dead + had quest items, check and fix any broken find item quests
692+
this.checkForAndFixPickupQuestsAfterDeath(sessionId, lostQuestItems, pmcProfile.Quests);
693+
}
694+
695695
this.pmcChatResponseService.sendKillerResponse(sessionId, pmcProfile, postRaidProfile.Stats.Eft.Aggressor);
696696

697697
this.inRaidHelper.deleteInventory(pmcProfile, sessionId);

0 commit comments

Comments
 (0)