From b4a6ee682cadd0e98853ce1ffc8f21fc95760650 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 13 Jul 2024 09:33:04 +0100 Subject: [PATCH] Added workaround for `Ref` repeatables not having any description text - force him to use `Prapor` text instead (cherry picked from commit 034c7142fc8de1fe34694eb5925bfb9c43e3ecad) --- .../generators/RepeatableQuestGenerator.ts | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index cb764707..ea780337 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -892,35 +892,40 @@ export class RepeatableQuestGenerator // Get template id from config based on side and type of quest questClone.templateId = this.questConfig.questTemplateIds[side.toLowerCase()][type.toLowerCase()]; + // Force REF templates to use prapors ID - solves missing text issue + const desiredTraderId = (traderId === Traders.REF) + ? Traders.PRAPOR + : traderId; + questClone.name = questClone.name .replace("{traderId}", traderId) .replace("{templateId}", questClone.templateId); questClone.note = questClone.note - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.description = questClone.description - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.successMessageText = questClone.successMessageText - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.failMessageText = questClone.failMessageText - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.startedMessageText = questClone.startedMessageText - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.changeQuestMessageText = questClone.changeQuestMessageText - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.acceptPlayerMessage = questClone.acceptPlayerMessage - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.declinePlayerMessage = questClone.declinePlayerMessage - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); questClone.completePlayerMessage = questClone.completePlayerMessage - .replace("{traderId}", traderId) + .replace("{traderId}", desiredTraderId) .replace("{templateId}", questClone.templateId); return questClone;