diff --git a/project/src/controllers/RepairController.ts b/project/src/controllers/RepairController.ts index 13b6ddaf..2249afc7 100644 --- a/project/src/controllers/RepairController.ts +++ b/project/src/controllers/RepairController.ts @@ -100,11 +100,7 @@ export class RepairController output, ); - // Bonuses only get applied when players weapon maintenance skill is over level 10 - if (this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.WEAPON_TREATMENT)?.Progress >= 1000) - { - this.repairService.addBuffToItem(repairDetails, pmcData); - } + this.repairService.addBuffToItem(repairDetails, pmcData); // add repaired item to send to client output.profileChanges[sessionID].items.change.push(repairDetails.repairedItem); diff --git a/project/src/services/RepairService.ts b/project/src/services/RepairService.ts index 9a6b60dc..20a7ef33 100644 --- a/project/src/services/RepairService.ts +++ b/project/src/services/RepairService.ts @@ -510,6 +510,24 @@ export class RepairService return false; } + // Skill < level 10 + repairing weapon + if ( + itemSkillType === SkillTypes.WEAPON_TREATMENT + && this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.WEAPON_TREATMENT)?.Progress < 1000 + ) + { + return false; + } + + // Skill < level 10 + repairing armor + if ( + ([SkillTypes.LIGHT_VESTS, SkillTypes.HEAVY_VESTS].includes(itemSkillType)) + && this.profileHelper.getSkillFromProfile(pmcData, itemSkillType)?.Progress < 1000 + ) + { + return false; + } + const commonBuffMinChanceValue = globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffMinChanceValue; const commonBuffChanceLevelBonus =