@@ -639,8 +639,8 @@ export class LocationLifecycleService {
639
639
const postRaidProfile = request . results . profile ;
640
640
const preRaidProfileQuestDataClone = this . cloner . clone ( pmcProfile . Quests ) ;
641
641
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
644
644
const lostQuestItems = this . profileHelper . getQuestItemsInProfile ( postRaidProfile ) ;
645
645
646
646
// Update inventory
@@ -655,12 +655,6 @@ export class LocationLifecycleService {
655
655
pmcProfile . Achievements = postRaidProfile . Achievements ;
656
656
pmcProfile . Quests = this . processPostRaidQuests ( postRaidProfile . Quests ) ;
657
657
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
-
664
658
// Handle edge case - must occur AFTER processPostRaidQuests()
665
659
this . lightkeeperQuestWorkaround ( sessionId , postRaidProfile . Quests , preRaidProfileQuestDataClone , pmcProfile ) ;
666
660
@@ -692,6 +686,12 @@ export class LocationLifecycleService {
692
686
this . healthHelper . updateProfileHealthPostRaid ( pmcProfile , postRaidProfile . Health , sessionId , isDead ) ;
693
687
694
688
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
+
695
695
this . pmcChatResponseService . sendKillerResponse ( sessionId , pmcProfile , postRaidProfile . Stats . Eft . Aggressor ) ;
696
696
697
697
this . inRaidHelper . deleteInventory ( pmcProfile , sessionId ) ;
0 commit comments