Fixed so that the description message always comes first with the action workflow

This commit is contained in:
WBHarry 2026-02-01 21:05:50 +01:00
parent 668dbdf8f4
commit 4f52d541b4
3 changed files with 10 additions and 1 deletions

View file

@ -96,6 +96,13 @@ export default class DHRoll extends Roll {
}
static async toMessage(roll, config) {
const item = config.data.parent?.items?.get?.(config.source.item) ?? null;
const action = item ? item.system.actions.get(config.source.action) : null;
if (action?.chatDisplay && !config.actionChatMessageHandled) {
await action.toChat();
config.actionChatMessageHandled = true;
}
const cls = getDocumentClass('ChatMessage'),
msgData = {
type: this.messageType,