replace static implementation properties with getDocumentClass calls for improved compatibility
This commit is contained in:
parent
0bd91a8018
commit
0f9c20a041
1 changed files with 8 additions and 6 deletions
|
|
@ -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 = ActiveEffect.implementation.fromObject(effectData, { parent: this });
|
||||
const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this });
|
||||
yield effectInstance;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ export function patchIkonisLogic() {
|
|||
|
||||
const effectData = effect.toObject();
|
||||
effectData.disabled = false;
|
||||
const effectInstance = ActiveEffect.implementation.fromObject(effectData, { parent: this });
|
||||
const effectInstance = getDocumentClass("ActiveEffect").fromObject(effectData, { parent: this });
|
||||
yield effectInstance;
|
||||
}
|
||||
}
|
||||
|
|
@ -159,8 +159,9 @@ export function patchDhCharacter(DhCharacter) {
|
|||
if (bondedUuid) {
|
||||
const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid);
|
||||
if (feature) {
|
||||
// Use fromObject with parent to ensure all Action models link correctly
|
||||
const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent });
|
||||
// Use getDocumentClass to ensure we have the correct Item class
|
||||
const ItemClass = getDocumentClass("Item");
|
||||
const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent });
|
||||
ikonisFeatures.push(featureClone);
|
||||
console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`);
|
||||
}
|
||||
|
|
@ -177,8 +178,9 @@ export function patchDhCharacter(DhCharacter) {
|
|||
|
||||
const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid);
|
||||
if (feature) {
|
||||
// Use fromObject with parent to ensure all Action models link correctly
|
||||
const featureClone = Item.implementation.fromObject(feature.toObject(), { parent: this.parent });
|
||||
// Use getDocumentClass to ensure we have the correct Item class
|
||||
const ItemClass = getDocumentClass("Item");
|
||||
const featureClone = ItemClass.fromObject(feature.toObject(), { parent: this.parent });
|
||||
ikonisFeatures.push(featureClone);
|
||||
console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue