Corrected variable

This commit is contained in:
WBHarry 2025-08-16 01:42:47 +02:00
parent 113ff2a8c5
commit 105bd4cccb

View file

@ -42,9 +42,9 @@ export default class DHFeature extends BaseDataItem {
traitValue =
this.actor.system.traits[this.actor.items.get(this.originId).system.spellcastingTrait]?.value ?? 0;
} else {
const { value: multiclass, subclas } = this.actor.system.multiclass;
const subclass = multiclass?.id === this.originId ? subclass : this.actor.system.class.subclass;
traitValue = this.actor.system.traits[subclass.system.spellcastingTrait]?.value ?? 0;
const { value: multiclass, subclass } = this.actor.system.multiclass;
const selectedSubclass = multiclass?.id === this.originId ? subclass : this.actor.system.class.subclass;
traitValue = this.actor.system.traits[selectedSubclass.system.spellcastingTrait]?.value ?? 0;
}
}