Revert "Fixed multiclass"

This reverts commit 2d20fb0df4.
This commit is contained in:
WBHarry 2025-08-23 13:20:02 +02:00
parent 2d20fb0df4
commit f76515eac1
5 changed files with 15 additions and 8 deletions

View file

@ -102,6 +102,15 @@ 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;