From 7f8e3fee6e2c0ac3035502354a6431846cb939cd Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 27 Mar 2026 22:24:13 +0100 Subject: [PATCH] Fixed ActiveEffect preCreate blocking multiple effects with origin=null --- module/documents/activeEffect.mjs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 959971d5..8ec7a751 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -1,5 +1,4 @@ import { itemAbleRollParse } from '../helpers/utils.mjs'; -import { RefreshType } from '../systemRegistration/socket.mjs'; export default class DhActiveEffect extends foundry.documents.ActiveEffect { /* -------------------------------------------- */ @@ -108,7 +107,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { update.img = 'icons/magic/life/heart-cross-blue.webp'; } - if (this.actor) { + if (this.actor && data.origin) { const existingEffect = this.actor.effects.find(x => x.origin === data.origin); const stacks = Boolean(data.system?.stacking); if (existingEffect && !stacks) return false; @@ -153,20 +152,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { await super._preCreate(data, options, user); } - /** @inheritdoc */ - _onCreate(data, options, userId) { - super._onCreate(data, options, userId); - - Hooks.callAll(RefreshType.EffectsDisplay); - } - - /** @inheritdoc */ - _onDelete(data, options, userId) { - super._onDelete(data, options, userId); - - Hooks.callAll(RefreshType.EffectsDisplay); - } - /* -------------------------------------------- */ /* Methods */ /* -------------------------------------------- */