Fixed so subclasses can be dragged to the sheet when they're stored in a folder (#1081)

This commit is contained in:
WBHarry 2025-08-26 02:14:09 +02:00 committed by GitHub
parent ff65a85458
commit 76d753cd88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,8 +52,7 @@ export default class DHSubclass extends BaseDataItem {
async _preCreate(data, options, user) { async _preCreate(data, options, user) {
if (this.actor?.type === 'character') { if (this.actor?.type === 'character') {
const dataUuid = const dataUuid = data.uuid ?? data._stats.compendiumSource ?? `Item.${data._id}`;
data.uuid ?? (data.folder ? `Compendium.daggerheart.subclasses.Item.${data._id}` : `Item.${data._id}`);
if (this.actor.system.class.subclass) { if (this.actor.system.class.subclass) {
if (this.actor.system.multiclass.subclass) { if (this.actor.system.multiclass.subclass) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.subclassesAlreadyPresent')); ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.subclassesAlreadyPresent'));