Skip to content

Commit

Permalink
🐛 Only use item if there is an item
Browse files Browse the repository at this point in the history
(adjust if condition)
  • Loading branch information
Cussa committed Feb 16, 2024
1 parent e567943 commit 29ff49b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/rolls/roll.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export class Trued6Roll {
finalRoll = await this.sendRollToChat(attackRoll, actor, data, this.RollStyles.Normal, actorRollData);
}
if (data.itemId &&
(rollStyle == this.RollStyles.Disadvantage && roll.total == 0) ||
rollStyle == this.RollStyles.Normal) {
((rollStyle == this.RollStyles.Disadvantage && roll.total == 0) ||
rollStyle == this.RollStyles.Normal)) {
let item = actor.items.get(data.itemId);
await item.updateUsage(roll);
}
Expand Down

0 comments on commit 29ff49b

Please sign in to comment.