forked from public/foundryvtt-reve-de-dragon
Fix: lien vers rencontre du compendium
This commit is contained in:
@ -100,19 +100,21 @@ export class TMRRencontres {
|
||||
|
||||
const row = await this.table.getRandom(frequence, filtreMauvaise);
|
||||
if (row) {
|
||||
row.document = this.createRencontre(row.document, tmr);
|
||||
await this.$chatRolledRencontre(row, tmr);
|
||||
const rencontre = await this.createRencontre(row.document, tmr);
|
||||
await this.$chatRolledRencontre(row, rencontre, tmr);
|
||||
return rencontre;
|
||||
}
|
||||
return row?.document;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async $chatRolledRencontre(row, tmr) {
|
||||
async $chatRolledRencontre(row, rencontre,tmr) {
|
||||
const flavorContent = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-compendium-table-roll-rencontre.html',
|
||||
{
|
||||
roll: row.roll,
|
||||
rencontre: row?.document,
|
||||
rencontre,
|
||||
row,
|
||||
percentages: (row.total == 100) ? '%' : '',
|
||||
tmr,
|
||||
isGM: game.user.isGM,
|
||||
|
Reference in New Issue
Block a user