Fixed multiclass

This commit is contained in:
WBHarry 2025-08-23 13:18:14 +02:00
parent b83adbf09b
commit 2d20fb0df4
5 changed files with 8 additions and 15 deletions

View file

@ -102,15 +102,6 @@ export default class DHClass extends BaseDataItem {
if (allowed === false) return;
}
_onDelete(options, userId) {
super._onDelete(options, userId);
if (options.parent?.type === 'character') {
const path = `system.${this.isMulticlass ? 'multiclass' : 'class'}`;
foundry.utils.getProperty(options.parent, `${path}.subclass`)?.delete();
}
}
async _preUpdate(changed, options, userId) {
const allowed = await super._preUpdate(changed, options, userId);
if (allowed === false) return false;