Prevent giving player 0 intellect skill points when crafting in hideout
This commit is contained in:
parent
4eebd5feef
commit
73cfc16699
@ -864,15 +864,21 @@ export class HideoutController
|
|||||||
globals.config.SkillsSettings.HideoutManagement.SkillPointsPerCraft,
|
globals.config.SkillsSettings.HideoutManagement.SkillPointsPerCraft,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
// manager Crafting skill
|
// Manager Crafting skill
|
||||||
if (craftingExpAmount > 0)
|
if (craftingExpAmount > 0)
|
||||||
{
|
{
|
||||||
this.profileHelper.addSkillPointsToPlayer(pmcData, SkillTypes.CRAFTING, craftingExpAmount);
|
this.profileHelper.addSkillPointsToPlayer(pmcData, SkillTypes.CRAFTING, craftingExpAmount);
|
||||||
this.profileHelper.addSkillPointsToPlayer(
|
|
||||||
pmcData,
|
const intellectAmountToGive = 0.5 * (Math.round(craftingExpAmount / 15));
|
||||||
SkillTypes.INTELLECT,
|
if (intellectAmountToGive > 0)
|
||||||
0.5 * (Math.round(craftingExpAmount / 15)),
|
{
|
||||||
);
|
this.profileHelper.addSkillPointsToPlayer(
|
||||||
|
pmcData,
|
||||||
|
SkillTypes.INTELLECT,
|
||||||
|
intellectAmountToGive,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
area.lastRecipe = request.recipeId;
|
area.lastRecipe = request.recipeId;
|
||||||
counterHoursCrafting.value = hoursCrafting;
|
counterHoursCrafting.value = hoursCrafting;
|
||||||
|
Loading…
Reference in New Issue
Block a user