Reset repeatable+failed quests to Fail instead of MarkedAsFailed after raid

This commit is contained in:
Dev 2024-09-10 13:41:54 +01:00
parent f0f0627c69
commit e650271d3a

View File

@ -528,6 +528,19 @@ export class LocationLifecycleService {
} }
} }
// Find marked as failed quests + flagged as restartable and re-status them as 'failed' so they can be restarted by player
const failedQuests = questsToProcess.filter((quest) => quest.status === QuestStatus.MarkedAsFailed);
for (const failedQuest of failedQuests) {
const dbQuest = this.databaseService.getQuests()[failedQuest.qid];
if (!dbQuest) {
continue;
}
if (dbQuest.restartable) {
failedQuest.status = QuestStatus.Fail;
}
}
return questsToProcess; return questsToProcess;
} }