foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
339 stars 226 forks source link

[BUG - 4.1.1] #rollSkillTool() doesn't merge the message Object properly. #4716

Closed thatlonelybugbear closed 1 week ago

thatlonelybugbear commented 1 week ago
 const messageConfig = foundry.utils.mergeObject({
    create: true,
    data: {
        flags: {
            dnd5e: {
                messageType: 'roll',
                roll: {
                    [`${type}Id`]: config[type],
                    type,
                },
            },
        },
        flavor: type === 'skill' ? game.i18n.format('DND5E.SkillPromptTitle', { skill: skillConfig.label }) : game.i18n.format('DND5E.ToolPromptTitle', { tool: Trait.keyLabel(config.tool, { trait: 'tool' }) ?? '' }),
        speaker: ChatMessage.getSpeaker({ actor: this }),
    },
-});
+}, message);