From 7e06517c8c7c4350ba0c7c79cebf7d67ba1de94e Mon Sep 17 00:00:00 2001 From: HiddenCirno <2301697863@qq.com> Date: Sun, 21 Jul 2024 12:01:12 +0000 Subject: [PATCH] Fix that charisma skill cannot deduct repeatable quest change cost (!380) add discount caculation for repeatable quest change, not it can deduct cost with player's charisma skil level(per level 0.1%) Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/380 Co-authored-by: HiddenCirno <2301697863@qq.com> Co-committed-by: HiddenCirno <2301697863@qq.com> --- project/src/controllers/RepeatableQuestController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index 2774897a..9ae926f0 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -601,6 +601,7 @@ export class RepeatableQuestController // not free, Charge player 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) this.paymentService.addPaymentToOutput(pmcData, cost.templateId, cost.count, sessionID, output); if (output.warnings.length > 0) {