From 9df6357f623f8ee5b2a6030fd26b0e27b70c8959 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 21 Jul 2024 16:24:05 +0100 Subject: [PATCH] Improved formatting of repeatable charisma bonus application (cherry picked from commit 9af480f6253fb25dd96fa73b2b88c717313ffbee) --- project/src/controllers/RepeatableQuestController.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index 9ae926f0..c66932a3 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -598,10 +598,12 @@ export class RepeatableQuestController // Reduce standing with trader for not doing their quest const traderOfReplacedQuest = pmcData.TradersInfo[replacedQuestTraderId]; traderOfReplacedQuest.standing -= previousChangeRequirement.changeStandingCost; - // not free, Charge player + + const charismaBonus = this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.CHARISMA)?.Progress ?? 0; for (const cost of previousChangeRequirement.changeCost) { - cost.count = Math.trunc(cost.count * (1-(Math.trunc((this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.CHARISMA)?.Progress ?? 0)/100)*0.001)) ??1) + // Not free, Charge player + appy charisma bonus to cost of replacement + cost.count = Math.trunc(cost.count * (1 - (Math.trunc((charismaBonus) / 100) * 0.001)) ?? 1); this.paymentService.addPaymentToOutput(pmcData, cost.templateId, cost.count, sessionID, output); if (output.warnings.length > 0) {