Fix: tirage dans une table ne fonctionnait plus
Régression bête, qui empêchait aussi d'afficher le résultat d'un échec contre un rêve de dragon
This commit is contained in:
parent
21ec043e98
commit
168127d8fe
@ -2,14 +2,14 @@ export class RdDRollTables {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async genericGetTableResult(tableName, toChat) {
|
static async genericGetTableResult(tableName, toChat) {
|
||||||
let table = RdDRollTables.getWorldTable() ?? (await RdDRollTables.getSystemTable(tableName));
|
let table = RdDRollTables.getWorldTable(tableName) ?? (await RdDRollTables.getSystemTable(tableName));
|
||||||
const draw = await table.draw({ displayChat: toChat, rollMode: "gmroll"});
|
const draw = await table.draw({ displayChat: toChat, rollMode: "gmroll"});
|
||||||
//console.log("RdDRollTables", tableName, toChat, ":", draw);
|
//console.log("RdDRollTables", tableName, toChat, ":", draw);
|
||||||
return draw.results.length > 0 ? draw.results[0] : undefined;
|
return draw.results.length > 0 ? draw.results[0] : undefined;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static getWorldTable() {
|
static getWorldTable(tableName) {
|
||||||
return game.tables.find(table => table.name.toLowerCase() == tableName.toLowerCase());
|
return game.tables.find(table => table.name.toLowerCase() == tableName.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user