diff --git a/module/actor.js b/module/actor.js index 181b1830..1b0a41e1 100644 --- a/module/actor.js +++ b/module/actor.js @@ -837,6 +837,7 @@ export class RdDActor extends Actor { this.checkCompetenceXP(compName, compValue); const update = { _id: comp.id, 'data.xp': compValue }; await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity + this.updateExperienceLog("XP Compétence", compValue, "XP attribués en " + compName); } else { console.log("Competence not found", compName); } @@ -850,6 +851,7 @@ export class RdDActor extends Actor { compValue = compValue ?? 0; const update = { _id: comp.id, 'data.xp_sort': compValue }; await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity + this.updateExperienceLog("XP Sort", compValue, "XP attribués en " + compName); } else { console.log("Competence not found", compName); } @@ -2044,9 +2046,11 @@ export class RdDActor extends Actor { } if (xpResult && xpResult.xpComp > 0 && rollData.competence) { this.checkCompetenceXP(rollData.competence.name); + this.updateExperienceLog("XP", xpResult.xpComp,"XP en compétence "+rollData.competence.name); } if (xpResult && xpResult.xpCarac > 0 && rollData.selectedCarac) { this.checkCaracXP(rollData.selectedCarac.name); + this.updateExperienceLog("XP", xpResult.xpCarac,"XP en carac "+rollData.selectedCarac.name); } }