Skip to content

Commit

Permalink
Fix certain innate spells being stuck at null uses (foundryvtt#12238)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez committed Dec 14, 2023
1 parent 03cf014 commit 18c963e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/item/spell/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,8 @@ class SpellPF2e<TParent extends ActorPF2e | null = ActorPF2e | null> extends Ite

const uses = system?.location?.uses;
if (uses) {
const currentUses = uses.value ?? this._source.system.location.uses?.value ?? 1;
const currentMax = uses.max ?? this._source.system.location.uses?.max;
const currentUses = uses.value ?? this.system.location.uses?.value ?? 1;
const currentMax = uses.max ?? this.system.location.uses?.max ?? 1;
uses.value = Math.clamped(Number(currentUses), 0, Number(currentMax));
}
}
Expand Down

0 comments on commit 18c963e

Please sign in to comment.