This commit is contained in:
WBHarry 2025-08-05 16:34:46 +02:00 committed by GitHub
parent d80b5d158d
commit 4827b337d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 72 additions and 39 deletions

View file

@ -158,16 +158,19 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
x.type === 'subclass' &&
x.system.isMulticlass === (this.parent.system.identifier === 'multiclass')
);
const featureState = subclass.system.featureState;
const featureType = subclass
? (subclass.system.features.find(x => x.item?.uuid === this.parent.uuid)?.type ?? null)
: null;
if (
(featureType === CONFIG.DH.ITEM.featureSubTypes.specialization && featureState < 2) ||
(featureType === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3)
) {
this.transfer = false;
if (subclass) {
const featureState = subclass.system.featureState;
const featureType = subclass
? (subclass.system.features.find(x => x.item?.uuid === this.parent.uuid)?.type ?? null)
: null;
if (
(featureType === CONFIG.DH.ITEM.featureSubTypes.specialization && featureState < 2) ||
(featureType === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3)
) {
this.transfer = false;
}
}
}
}