diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index a3b35de..070af55 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -99,7 +99,8 @@ export function patchIkonisLogic() { // Clone the effect and set this actor as parent to ensure application const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this }); + const ActiveEffectClass = getDocumentClass("ActiveEffect"); + const effectInstance = new ActiveEffectClass(effectData, { parent: this }); yield effectInstance; } } @@ -115,7 +116,8 @@ export function patchIkonisLogic() { const effectData = effect.toObject(); effectData.disabled = false; - const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this }); + const ActiveEffectClass = getDocumentClass("ActiveEffect"); + const effectInstance = new ActiveEffectClass(effectData, { parent: this }); yield effectInstance; } } @@ -159,9 +161,9 @@ export function patchDhCharacter(DhCharacter) { if (bondedUuid) { const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid); if (feature) { - // Use getDocumentClass to ensure we have the correct Item class + // Use constructor to ensure compatibility const ItemClass = getDocumentClass("Item"); - const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent }); + const featureClone = new ItemClass(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`); } @@ -178,9 +180,9 @@ export function patchDhCharacter(DhCharacter) { const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid); if (feature) { - // Use getDocumentClass to ensure we have the correct Item class + // Use constructor to ensure compatibility const ItemClass = getDocumentClass("Item"); - const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent }); + const featureClone = new ItemClass(feature.toObject(), { parent: this.parent }); ikonisFeatures.push(featureClone); console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`); }