Move weapon skill check into shouldBuffItem()
+ do similar check for armor
This commit is contained in:
parent
9bc08fbd26
commit
0c404cbcba
@ -100,11 +100,7 @@ export class RepairController
|
|||||||
output,
|
output,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Bonuses only get applied when players weapon maintenance skill is over level 10
|
this.repairService.addBuffToItem(repairDetails, pmcData);
|
||||||
if (this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.WEAPON_TREATMENT)?.Progress >= 1000)
|
|
||||||
{
|
|
||||||
this.repairService.addBuffToItem(repairDetails, pmcData);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add repaired item to send to client
|
// add repaired item to send to client
|
||||||
output.profileChanges[sessionID].items.change.push(repairDetails.repairedItem);
|
output.profileChanges[sessionID].items.change.push(repairDetails.repairedItem);
|
||||||
|
@ -510,6 +510,24 @@ export class RepairService
|
|||||||
return false;
|
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 =
|
const commonBuffMinChanceValue =
|
||||||
globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffMinChanceValue;
|
globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffMinChanceValue;
|
||||||
const commonBuffChanceLevelBonus =
|
const commonBuffChanceLevelBonus =
|
||||||
|
Loading…
Reference in New Issue
Block a user