Add XP log message
This commit is contained in:
parent
a77c285ee4
commit
0136cc1bd4
@ -837,6 +837,7 @@ export class RdDActor extends Actor {
|
|||||||
this.checkCompetenceXP(compName, compValue);
|
this.checkCompetenceXP(compName, compValue);
|
||||||
const update = { _id: comp.id, 'data.xp': compValue };
|
const update = { _id: comp.id, 'data.xp': compValue };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
|
this.updateExperienceLog("XP Compétence", compValue, "XP attribués en " + compName);
|
||||||
} else {
|
} else {
|
||||||
console.log("Competence not found", compName);
|
console.log("Competence not found", compName);
|
||||||
}
|
}
|
||||||
@ -850,6 +851,7 @@ export class RdDActor extends Actor {
|
|||||||
compValue = compValue ?? 0;
|
compValue = compValue ?? 0;
|
||||||
const update = { _id: comp.id, 'data.xp_sort': compValue };
|
const update = { _id: comp.id, 'data.xp_sort': compValue };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
|
this.updateExperienceLog("XP Sort", compValue, "XP attribués en " + compName);
|
||||||
} else {
|
} else {
|
||||||
console.log("Competence not found", compName);
|
console.log("Competence not found", compName);
|
||||||
}
|
}
|
||||||
@ -2044,9 +2046,11 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
if (xpResult && xpResult.xpComp > 0 && rollData.competence) {
|
if (xpResult && xpResult.xpComp > 0 && rollData.competence) {
|
||||||
this.checkCompetenceXP(rollData.competence.name);
|
this.checkCompetenceXP(rollData.competence.name);
|
||||||
|
this.updateExperienceLog("XP", xpResult.xpComp,"XP en compétence "+rollData.competence.name);
|
||||||
}
|
}
|
||||||
if (xpResult && xpResult.xpCarac > 0 && rollData.selectedCarac) {
|
if (xpResult && xpResult.xpCarac > 0 && rollData.selectedCarac) {
|
||||||
this.checkCaracXP(rollData.selectedCarac.name);
|
this.checkCaracXP(rollData.selectedCarac.name);
|
||||||
|
this.updateExperienceLog("XP", xpResult.xpCarac,"XP en carac "+rollData.selectedCarac.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user