Fixed a bug introduced by DiceSoNice 4.2.1

This commit is contained in:
Vlyan
2021-10-11 18:13:25 +02:00
parent 967b2c7383
commit 4ea8190adc
2 changed files with 7 additions and 1 deletions

View File

@@ -259,7 +259,10 @@ export default class HooksL5r5e {
* @param {object} context
*/
static diceSoNiceRollStart(messageId, context) {
if (context.roll.l5r5e?.history) {
// In DsN 4.2.1+ the roll is altered in context.
// So we need to get the original message instead of "context.roll.l5r5e?.history"
const message = game.messages.get(messageId);
if (message?._roll?.l5r5e?.history) {
context.blind = true;
}
}