From 30602e946a13383ce7738441f51948a450b9e6c6 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 20 Jul 2025 11:35:28 +0200 Subject: [PATCH] rollData change --- module/data/action/baseAction.mjs | 2 +- module/documents/actor.mjs | 1 + templates/sheets/actors/adversary/sidebar.hbs | 4 ++-- templates/sheets/actors/character/sidebar.hbs | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 4c6a9d60..ad442951 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -164,7 +164,7 @@ export default class DHBaseAction extends foundry.abstract.DataModel { getRollData(data = {}) { if (!this.actor) return null; - const actorData = this.actor.system.getRollData(false); + const actorData = this.actor.getRollData(false); // Add Roll results to RollDatas actorData.result = data.roll?.total ?? 1; diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 83ece8ed..5879a125 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -370,6 +370,7 @@ export default class DhpActor extends Actor { getRollData() { const rollData = super.getRollData(); + rollData.system = super.getRollData(); rollData.prof = this.system.proficiency ?? 1; rollData.cast = this.system.spellcastModifier ?? 1; return rollData; diff --git a/templates/sheets/actors/adversary/sidebar.hbs b/templates/sheets/actors/adversary/sidebar.hbs index 920d6a10..131fb33b 100644 --- a/templates/sheets/actors/adversary/sidebar.hbs +++ b/templates/sheets/actors/adversary/sidebar.hbs @@ -92,7 +92,7 @@
-

{{localize DAGGERHEART.GENERAL.experience.plural}}

+

{{localize "DAGGERHEART.GENERAL.experience.plural"}}

@@ -113,6 +113,6 @@
- +
\ No newline at end of file diff --git a/templates/sheets/actors/character/sidebar.hbs b/templates/sheets/actors/character/sidebar.hbs index 0a6c89cb..b9ac28a6 100644 --- a/templates/sheets/actors/character/sidebar.hbs +++ b/templates/sheets/actors/character/sidebar.hbs @@ -47,7 +47,7 @@

{{document.system.proficiency}}

-

{{localize "DAGGERHEART.GENERAL.proficienc"}}

+

{{localize "DAGGERHEART.GENERAL.proficiency"}}

@@ -135,7 +135,7 @@
-

{{localize "DAGGERHEART.GENERAL.experience.Single"}}

+

{{localize "DAGGERHEART.GENERAL.experience.single"}}