Fixed message.rolls not being updated

This commit is contained in:
WBHarry 2025-07-22 20:02:37 +02:00
parent dfd10da324
commit 565f0f9e6f
2 changed files with 10 additions and 6 deletions

View file

@ -324,7 +324,13 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
if (game.modules.get('dice-so-nice')?.active) {
const diceSoNiceRoll = {
_evaluated: true,
dice: [new Die({ ...term, faces: term._faces, results: term.results.filter(x => !x.rerolled) })],
dice: [
new foundry.dice.terms.Die({
...term,
faces: term._faces,
results: term.results.filter(x => !x.rerolled)
})
],
options: { appearance: {} }
};
const diceSoNicePresets = getDiceSoNicePresets();
@ -358,7 +364,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
newRoll.extra = newRoll.extra.slice(2);
await game.messages.get(message._id).update({
'system.roll': newRoll
'system.roll': newRoll,
'rolls': [parsedRoll]
});
};
}