mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
[Fix] 940 Character Import (#962)
* Changed Class/Multiclass to simple getters to avoid having to keep them up to date * Corrected variable
This commit is contained in:
parent
0e43bf197d
commit
ab76d9e91d
4 changed files with 27 additions and 50 deletions
|
|
@ -42,11 +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 subclass =
|
||||
this.actor.system.multiclass.value?.id === this.originId
|
||||
? this.actor.system.multiclass.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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue