Protect again null quest object when trying to send a message during quest failure

This commit is contained in:
Dev 2024-02-12 21:23:20 +00:00
parent 8dd38d633e
commit c4520ddbe9

View File

@ -712,7 +712,7 @@ export class QuestHelper
{
this.mailSendService.sendLocalisedNpcMessageToPlayer(
sessionID,
this.traderHelper.getTraderById(quest.traderId),
this.traderHelper.getTraderById(quest?.traderId ?? matchingRepeatable.traderId), // can be null when repeatable quest has been moved to inactiveQuests
MessageType.QUEST_FAIL,
quest.failMessageText,
questRewards,