Fixes for RnK visibility

This commit is contained in:
Vlyan
2021-08-12 10:29:13 +02:00
parent 45af487a4b
commit 0d7ddddaee
5 changed files with 38 additions and 7 deletions

View File

@@ -511,4 +511,22 @@ export class HelpersL5r5e {
content: `<div class="l5r5e-chat-item">${tpl}${link ? `<hr>` + link : ""}</div>`,
});
}
/**
* Return the RollMode for this ChatData
* @param {object} chatData
* @return {string}
*/
static getRollMode(chatData) {
if (chatData.whisper.length === 1 && chatData.whisper[0] === game.user.id) {
return "selfroll";
}
if (chatData.blind) {
return "blindroll";
}
if (chatData.whisper.length > 1) {
return "gmroll";
}
return "roll";
}
}