Preparation callbacks pour nouveaux Rolls
This commit is contained in:
17
module/rdd-roll-result.js
Normal file
17
module/rdd-roll-result.js
Normal file
@ -0,0 +1,17 @@
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
|
||||
export class RdDRollResult {
|
||||
|
||||
static async displayRollData(rollData, actor = undefined, template = 'chat-resultat-general.html') {
|
||||
const chatMessage = await ChatUtility.createChatWithRollMode(
|
||||
{ content: await RdDRollResult.buildRollDataHtml(rollData, template) },
|
||||
actor
|
||||
)
|
||||
return chatMessage
|
||||
}
|
||||
|
||||
static async buildRollDataHtml(rollData, template = 'chat-resultat-general.html') {
|
||||
rollData.show = rollData.show || {};
|
||||
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user