This commit is contained in:
Vincent Vandemeulebrouck 2021-06-30 01:02:01 +02:00
parent c857def360
commit 7c1a3267f2
2 changed files with 5 additions and 8 deletions

View File

@ -2155,10 +2155,7 @@ export class RdDActor extends Actor {
async appliquerAjoutExperience(rollData, display) { async appliquerAjoutExperience(rollData, display) {
if (!this.isPersonnage()) return; if (!this.isPersonnage()) return;
let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence); let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence);
if (!xpData) { if (xpData && display) {
return;
}
if (display) {
let message = { let message = {
whisher: ChatUtility.getWhisperRecipientsAndGMs(this.name), whisher: ChatUtility.getWhisperRecipientsAndGMs(this.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData) content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData)
@ -2168,7 +2165,7 @@ export class RdDActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async _appliquerAppelMoral(rollData, display = true) { async _appliquerAppelMoral(rollData) {
if (!this.isPersonnage()) return; if (!this.isPersonnage()) return;
if (!rollData.useMoral) return; if (!rollData.useMoral) return;
if (rollData.rolled.isEchec || if (rollData.rolled.isEchec ||