From 5b61340fee0bd73ced82dd646ded6f301f4c0061 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Tue, 13 Jan 2026 22:36:50 +0100 Subject: [PATCH] Fixed /dr without target failing resource update --- daggerheart.mjs | 2 +- module/dice/dualityRoll.mjs | 2 ++ module/enrichers/DualityRollEnricher.mjs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/daggerheart.mjs b/daggerheart.mjs index f27892e2..4e88c148 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -309,7 +309,7 @@ Hooks.on('chatMessage', (_, message) => { target, difficulty, title, - label: 'test', + label: game.i18n.localize('DAGGERHEART.GENERAL.dualityRoll'), actionType: null, advantage }); diff --git a/module/dice/dualityRoll.mjs b/module/dice/dualityRoll.mjs index 32bb167a..aaca7400 100644 --- a/module/dice/dualityRoll.mjs +++ b/module/dice/dualityRoll.mjs @@ -261,6 +261,8 @@ export default class DualityRoll extends D20Roll { } static async handleTriggers(roll, config) { + if (!config.source?.actor) return; + const updates = []; const dualityUpdates = await game.system.registeredTriggers.runTrigger( CONFIG.DH.TRIGGER.triggers.dualityRoll.id, diff --git a/module/enrichers/DualityRollEnricher.mjs b/module/enrichers/DualityRollEnricher.mjs index 95733c45..536847f7 100644 --- a/module/enrichers/DualityRollEnricher.mjs +++ b/module/enrichers/DualityRollEnricher.mjs @@ -86,9 +86,9 @@ export const enrichedDualityRoll = async ( const config = { event: event ?? {}, title: title, + headerTitle: label, roll: { trait: traitValue && target ? traitValue : null, - label: label, difficulty: difficulty, advantage, type: reaction ? 'reaction' : null