Messages d'expérience privés

Toujours envoyer les messages au MJ + joueur,
pas à tout le monde

Sinon, l'expérience des PNJs est visible en cas de jet publics
This commit is contained in:
Vincent Vandemeulebrouck 2021-10-07 22:41:22 +02:00
parent 545dff3b29
commit db8f17fbc5

View File

@ -2112,7 +2112,8 @@ export class RdDActor extends Actor {
xp: carac.xp xp: carac.xp
} }
if (display) { if (display) {
ChatUtility.createChatWithRollMode(this.name, { ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-carac-xp.html`, checkXp) content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-carac-xp.html`, checkXp)
}); });
} }
@ -2143,7 +2144,8 @@ export class RdDActor extends Actor {
archetypeWarning: newCompData.data.niveau > compData.data.niveau_archetype archetypeWarning: newCompData.data.niveau > compData.data.niveau_archetype
} }
if (display) { if (display) {
ChatUtility.createChatWithRollMode(this.name, { ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-competence-xp.html`, checkXp) content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-competence-xp.html`, checkXp)
}); });
} }
@ -2157,11 +2159,10 @@ export class RdDActor extends Actor {
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 && display) { if (xpData && display) {
let message = { ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name), whisper: 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)
} });
ChatMessage.create(message);
} }
} }