Skip to content

Commit 0038a58

Browse files
committed
fix: transferEffect filter equippable items only
1 parent f380a39 commit 0038a58

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

module/documents/actors/actor.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,17 @@ export class FUActor extends Actor {
214214

215215
*allApplicableEffects() {
216216
for (const effect of super.allApplicableEffects()) {
217+
const applicableTypes = ['armor', 'shield', 'weapon', 'accessory'];
217218
if (effect.parent instanceof FUItem) {
218219
const itemId = effect.parent.id;
219-
const equipData = this.system.equipped;
220-
if (!equipData.transferEffects(itemId)) {
221-
continue;
220+
const itemType = effect.parent.type;
221+
222+
// Check if the item is one of the applicable types
223+
if (applicableTypes.includes(itemType)) {
224+
const equipData = this.system.equipped;
225+
if (!equipData.transferEffects(itemId)) {
226+
continue;
227+
}
222228
}
223229
}
224230
yield effect;

0 commit comments

Comments
 (0)