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>
(cherry picked from commit 7e06517c8c)
This commit is contained in:
HiddenCirno 2024-07-21 12:01:12 +00:00 committed by Dev
parent 3f43e3f118
commit 8ff9f6f945

View File

@ -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)
{