Other fixes for damage buttons from chat
This commit is contained in:
+3
-3
@@ -369,7 +369,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
action: "applyDR",
|
||||
label: game.i18n.localize("LETHALFANTASY.Combat.spellApplyDR"),
|
||||
icon: "fa-solid fa-shield",
|
||||
callback: (event, button, dialog) => Number(dialog.querySelector("[name='manualDr']")?.value) || 0
|
||||
callback: (event, button) => Number(button.form?.elements?.manualDr?.value) || 0
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
@@ -393,7 +393,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
actorName: actor.name,
|
||||
actorImage: actor.img
|
||||
}
|
||||
const roll = new LethalFantasyRoll(damageFormula, {}, rollOpts)
|
||||
const roll = new documents.LethalFantasyRoll(damageFormula, {}, rollOpts)
|
||||
await roll.evaluate()
|
||||
roll.options.rollTotal = roll.total
|
||||
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
|
||||
@@ -408,7 +408,7 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||
}
|
||||
|
||||
// Pour les monstres, utiliser prepareMonsterRoll
|
||||
if (isMonster || actor.type === "monster") {
|
||||
if (isMonster === "true" || actor.type === "monster") {
|
||||
await actor.system.prepareMonsterRoll("monster-damage", weaponId, undefined, undefined, damageModifier)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user