Corrected TagTeamDialog rerender logic when selecting a roll

This commit is contained in:
WBHarry 2026-07-17 18:35:25 +02:00
parent 0fe2865e79
commit 7afc98ed93
2 changed files with 11 additions and 2 deletions

View file

@ -595,6 +595,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
static async #selectRoll(_, button) { static async #selectRoll(_, button) {
const { memberKey } = button.dataset; const { memberKey } = button.dataset;
this.updatePartyData( this.updatePartyData(
{ {
[`system.tagTeam.members`]: Object.entries(this.party.system.tagTeam.members).reduce( [`system.tagTeam.members`]: Object.entries(this.party.system.tagTeam.members).reduce(
@ -605,7 +606,12 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
{} {}
) )
}, },
this.getUpdatingParts(button) /* Selecting a roll must update all member sections hbs to display the correct damage information incase of a critical */
[
...Object.keys(this.party.system.tagTeam.members),
this.constructor.PARTS.rollSelection.id,
this.constructor.PARTS.result.id
]
); );
} }

View file

@ -64,7 +64,10 @@
{{#if roll}} {{#if roll}}
<div class="roll-data {{#if roll.withHope}}hope{{else if roll.withFear}}fear{{else}}critical{{/if}}"> <div class="roll-data {{#if roll.withHope}}hope{{else if roll.withFear}}fear{{else}}critical{{/if}}">
<div class="duality-label">{{roll.total}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</div> <div class="duality-label">
{{roll.total}}
{{#if roll.isCritical}}{{roll.totalLabel}}{{else}}{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}{{/if}}
</div>
<div class="roll-dice-container"> <div class="roll-dice-container">
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope"> <a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
<span class="dice-label">{{roll.dHope.total}}</span> <span class="dice-label">{{roll.dHope.total}}</span>