mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fixed (#603)
This commit is contained in:
parent
d80b5d158d
commit
4827b337d0
6 changed files with 72 additions and 39 deletions
|
|
@ -46,12 +46,13 @@ export default class DHDomainCard extends BaseDataItem {
|
|||
if (allowed === false) return;
|
||||
|
||||
if (this.actor?.type === 'character') {
|
||||
if (!this.actor.system.class.value) {
|
||||
const actorClasses = this.actor.items.filter(x => x.type === 'class');
|
||||
if (!actorClasses.length) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noClassSelected'));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.actor.system.domains.find(x => x === this.domain)) {
|
||||
if (!actorClasses.some(c => c.system.domains.find(x => x === this.domain))) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.lacksDomain'));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue