mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Fixed
This commit is contained in:
parent
110bfa3492
commit
c8babc5873
5 changed files with 70 additions and 37 deletions
|
|
@ -158,16 +158,19 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
x.type === 'subclass' &&
|
||||
x.system.isMulticlass === (this.parent.system.identifier === 'multiclass')
|
||||
);
|
||||
const featureState = subclass.system.featureState;
|
||||
const featureType = subclass
|
||||
? (subclass.system.features.find(x => x.item?.uuid === this.parent.uuid)?.type ?? null)
|
||||
: null;
|
||||
|
||||
if (
|
||||
(featureType === CONFIG.DH.ITEM.featureSubTypes.specialization && featureState < 2) ||
|
||||
(featureType === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3)
|
||||
) {
|
||||
this.transfer = false;
|
||||
if (subclass) {
|
||||
const featureState = subclass.system.featureState;
|
||||
const featureType = subclass
|
||||
? (subclass.system.features.find(x => x.item?.uuid === this.parent.uuid)?.type ?? null)
|
||||
: null;
|
||||
|
||||
if (
|
||||
(featureType === CONFIG.DH.ITEM.featureSubTypes.specialization && featureState < 2) ||
|
||||
(featureType === CONFIG.DH.ITEM.featureSubTypes.mastery && featureState < 3)
|
||||
) {
|
||||
this.transfer = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
elements.forEach(e => {
|
||||
const uuid = e.dataset.permId,
|
||||
document = fromUuidSync(uuid);
|
||||
if (!document) return;
|
||||
|
||||
e.setAttribute('data-view-perm', document.testUserPermission(game.user, 'OBSERVER'));
|
||||
e.setAttribute('data-use-perm', document.testUserPermission(game.user, 'OWNER'));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue