Fixed using ItemLinkfield for Ancestry/Class/Subclass

This commit is contained in:
WBHarry 2025-07-22 01:39:51 +02:00
parent 060fe41730
commit 6336f2a60f
11 changed files with 70 additions and 113 deletions

View file

@ -12,4 +12,22 @@ export default class AncestrySheet extends DHHeritageSheet {
...super.PARTS,
features: { template: 'systems/daggerheart/templates/sheets/items/ancestry/features.hbs' }
};
/* -------------------------------------------- */
/* Application Drag/Drop */
/* -------------------------------------------- */
/**
* On drop on the item.
* @param {DragEvent} event - The drag event
*/
async _onDrop(event) {
const target = event.target.closest('fieldset.drop-section');
const typeField =
this.document.system[target.dataset.type === 'primary' ? 'primaryFeature' : 'secondaryFeature'];
if (!typeField) {
super._onDrop(event);
}
}
}