Skip to content

Commit

Permalink
Spell FIx
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk123999 committed Oct 6, 2024
1 parent 6184b6f commit 475c6b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/applications/medkit-actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ export class ActorMedkit extends HandlebarsApplicationMixin(ApplicationV2) {
let options = {source: undefined, version: undefined};
if (currentValue.sourceItem.pack.includes('gambits-premades')) {
options.source = 'gambits-premades';
if (currentValue.item?.actor?.type === 'character') {
if (currentValue.item?.actor?.type === 'character' || currentValue.item.type === 'spell') {
options.version = gambitPremades.gambitItems.find(i => i.name === currentValue.sourceItem.name)?.version;
} else {
options.version = gambitPremades.gambitMonsters.find(i => i.name === currentValue.sourceItem.name && i.monster === this.identifier)?.version;
}
} else if (currentValue.sourceItem.pack.includes('midi-item-showcase-community')) {
options.source = 'midi-item-showcase-community';
options.version = miscPremades.miscItems.find(i => i.name === currentValue.sourceItem.name)?.version;
if (currentValue.item?.actor?.type === 'character') {
if (currentValue.item?.actor?.type === 'character' || currentValue.item.type === 'spell') {
options.version = miscPremades.miscItems.find(i => i.name === currentValue.sourceItem.name)?.version;
} else {
options.version = miscPremades.miscMonsters.find(i => i.name === currentValue.sourceItem.name && i.monster === this.identifier)?.version;
Expand Down

0 comments on commit 475c6b9

Please sign in to comment.