From 58b0a7b9c4e5cbf6ffe630b1cf8747a9d72ae46d Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 15 Jan 2021 00:20:11 +0100 Subject: [PATCH] Message XP --- module/actor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/actor.js b/module/actor.js index d222fbbb..aa5df2c2 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1450,7 +1450,7 @@ export class RdDActor extends Actor { async checkCaracXP(caracName) { let carac = this.data.data.carac[caracName]; if (carac && carac.xp > 0) { - let xpNeeded = RdDUtility.getCaracNextXp(carac.value); + let xpNeeded = RdDUtility.getCaracNextXp(carac.value+1); if (carac.xp >= xpNeeded) { carac = duplicate(carac); carac.value = Number(carac.value) + 1; @@ -1476,7 +1476,7 @@ export class RdDActor extends Actor { } newXP = (newXP) ? newXP : competence.data.xp; if (competence && newXP > 0) { - let xpNeeded = RdDItemCompetence.getCompetenceNextXp(competence.data.niveau); + let xpNeeded = RdDItemCompetence.getCompetenceNextXp(competence.data.niveau+1); if (newXP >= xpNeeded) { let newCompetence = duplicate(competence); newCompetence.data.niveau += 1;