Added catch for stats of 0 to prevent errors.

This commit is contained in:
Aaron Lutomski
2026-06-21 13:44:55 -07:00
parent 78e46c66bc
commit efedccc205
6 changed files with 31 additions and 5 deletions
+7 -1
View File
@@ -36,8 +36,14 @@ export default function RollSheetMixin(Base) {
* @private
*/
static async _onRoll(event, target) {
if (target.classList.contains("not-rollable") || event.which === 2)
if (event.which === 2) return;
if (target.classList.contains("not-rollable")) {
if (target.dataset.rolltype === "stat") {
ui.notifications.warn("DG.Roll.CannotRollStat", { localize: true });
}
return;
}
const item = this.actor.items.get(target.dataset.iid);
const roll = createDGRollFromDataset(target.dataset, {