diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index 5ee93f6..8c262bb 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -99,7 +99,7 @@ export function patchIkonisLogic() { // Clone the effect and set this actor as parent to ensure application const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = new ActiveEffect(effectData, { parent: this }); + const effectInstance = ActiveEffect.implementation.fromObject(effectData, { parent: this }); yield effectInstance; } } @@ -115,7 +115,7 @@ export function patchIkonisLogic() { const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = new ActiveEffect(effectData, { parent: this }); + const effectInstance = ActiveEffect.implementation.fromObject(effectData, { parent: this }); yield effectInstance; } } @@ -159,8 +159,8 @@ export function patchDhCharacter(DhCharacter) { if (bondedUuid) { const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid); if (feature) { - // Clone with actor as parent so actions work - const featureClone = feature.clone({ parent: this.parent }, { keepId: true }); + // Use fromObject with parent to ensure all Action models link correctly + const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`); } @@ -177,8 +177,8 @@ export function patchDhCharacter(DhCharacter) { const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid); if (feature) { - // Clone with actor as parent so actions work - const featureClone = feature.clone({ parent: this.parent }, { keepId: true }); + // Use fromObject with parent to ensure all Action models link correctly + const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`); }