Les tirages de queues, têtes, ... ne concernent plus tout le monde, mais le joueur et le MJ
18 lines
686 B
JavaScript
18 lines
686 B
JavaScript
import { ChatUtility } from "./chat-utility.js";
|
|
import { renderTemplate } from "./constants.js";
|
|
|
|
export class RdDRollResult {
|
|
|
|
static async displayRollData(rollData, actor = undefined, template = 'chat-resultat-general.hbs') {
|
|
return await ChatMessage.create(ChatUtility.adaptVisibility(
|
|
{ content: await RdDRollResult.buildRollDataHtml(rollData, template) },
|
|
{ actor: actor, rollMode: rollData.current?.rollmode?.key }
|
|
))
|
|
}
|
|
|
|
static async buildRollDataHtml(rollData, template = 'chat-resultat-general.hbs') {
|
|
rollData.show = rollData.show || {};
|
|
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
|
|
}
|
|
}
|