0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Prevent no exit data killing client start

This commit is contained in:
Dev 2024-01-20 00:19:52 +00:00
parent a1f043d088
commit 05533bb166

View File

@ -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