From 05533bb166fb77ceb7e7d3164dc576dd4e81c0cd Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 20 Jan 2024 00:19:52 +0000 Subject: [PATCH] Prevent no exit data killing client start --- .../src/generators/RepeatableQuestGenerator.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index cf3153f8..5641c0e8 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -752,15 +752,17 @@ export class RepeatableQuestGenerator if (possibleExits.length === 0) { - this.logger.error("Possible exits was empty"); + this.logger.error(`Unable to choose specific exit on map: ${locationKey}, Possible exit pool was empty`); } + else + { + // Choose one of the exits we filtered above + const chosenExit = this.randomUtil.drawRandomFromList(possibleExits, 1)[0]; - // Choose one of the exits we filtered above - const chosenExit = this.randomUtil.drawRandomFromList(possibleExits, 1)[0]; - - // Create a quest condition to leave raid via chosen exit - const exitCondition = this.generateExplorationExitCondition(chosenExit); - quest.conditions.AvailableForFinish[0].counter.conditions.push(exitCondition); + // Create a quest condition to leave raid via chosen exit + const exitCondition = this.generateExplorationExitCondition(chosenExit); + quest.conditions.AvailableForFinish[0].counter.conditions.push(exitCondition); + } } // Difficulty for exploration goes from 1 extract to maxExtracts