mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Move vault when created handling to domain card preCreate
This commit is contained in:
parent
2f31f22e42
commit
200d28e185
2 changed files with 5 additions and 5 deletions
|
|
@ -882,11 +882,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
return super._onDropItem(event, item);
|
return super._onDropItem(event, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === 'domainCard' && !this.document.system.loadoutSlot.available) {
|
if (item.type === 'beastform') {
|
||||||
const itemData = item.toObject();
|
|
||||||
itemData.system.inVault = true;
|
|
||||||
return await this._onDropItemCreate(itemData);
|
|
||||||
} else if (item.type === 'beastform') {
|
|
||||||
if (this.document.effects.find(x => x.type === 'beastform')) {
|
if (this.document.effects.find(x => x.type === 'beastform')) {
|
||||||
return ui.notifications.warn(
|
return ui.notifications.warn(
|
||||||
game.i18n.localize('DAGGERHEART.UI.Notifications.beastformAlreadyApplied')
|
game.i18n.localize('DAGGERHEART.UI.Notifications.beastformAlreadyApplied')
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,10 @@ export default class DHDomainCard extends BaseDataItem {
|
||||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.duplicateDomainCard'));
|
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.duplicateDomainCard'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.actor.system.loadoutSlot.available) {
|
||||||
|
data.system.inVault = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue