Only send failed message to player if failure message text length is great than 0 (after having whitespace trimmed)

This commit is contained in:
Dev 2024-04-12 11:29:50 +01:00
parent 364e590960
commit 765c2ae270

View File

@ -733,6 +733,8 @@ export class QuestHelper
// Quest found and no repeatable found // Quest found and no repeatable found
if (quest && !matchingRepeatableQuest) if (quest && !matchingRepeatableQuest)
{
if (quest.failMessageText.trim().length > 0)
{ {
this.mailSendService.sendLocalisedNpcMessageToPlayer( this.mailSendService.sendLocalisedNpcMessageToPlayer(
sessionID, sessionID,
@ -743,6 +745,7 @@ export class QuestHelper
this.timeUtil.getHoursAsSeconds(this.questConfig.redeemTime), this.timeUtil.getHoursAsSeconds(this.questConfig.redeemTime),
); );
} }
}
output.profileChanges[sessionID].quests.push(...this.failedUnlocked(failRequest.qid, sessionID)); output.profileChanges[sessionID].quests.push(...this.failedUnlocked(failRequest.qid, sessionID));
} }