Skip to content

Commit 84f678f

Browse files
committed
a
1 parent 30f22b9 commit 84f678f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -869,14 +869,15 @@ export function initConfig() {
869869
const spellLevels = CONFIG.DND5E.spellLevels;
870870
const itemsToIgnore = [];
871871
if (game.modules.get("items-with-spells-5e")?.active) {
872+
const IWSAPI = game.modules.get("items-with-spells-5e").api;
872873
const actionType = this.items[0].system.activation?.type;
873874
const spellItems = this.actor.items.filter((item) => item.flags["items-with-spells-5e"]?.["item-spells"]?.length);
874875
for (const item of spellItems) {
875876
const spellData = item.flags["items-with-spells-5e"]["item-spells"];
876877
const itemsInSpell = spellData.map((spell) => this.actor.items.get(spell.id)).filter((item) => item && item.system.activation?.type === actionType);
877878
if (!itemsInSpell.length) continue;
878879
itemsToIgnore.push(...itemsInSpell);
879-
if (item.system.attunement === 1) continue;
880+
if (!IWSAPI.isUsableItem(item)) continue;
880881
this.itemsWithSpells.push({
881882
label: item.name,
882883
buttons: itemsInSpell.map((item) => new DND5eItemButton({ item })),

0 commit comments

Comments
 (0)