mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Fixes
This commit is contained in:
parent
62b25ccbfc
commit
a3984f30a4
2 changed files with 8 additions and 8 deletions
|
|
@ -219,8 +219,8 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
static async armorStackQuery({actorId, damage}) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const actor = await fromUuid(actorId);
|
||||
if(!actor || !actor?.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)) reject();
|
||||
new DamageReductionDialog(resolve, reject, actor, damage).render(true);
|
||||
if(!actor || !actor?.isOwner) reject();
|
||||
new DamageReductionDialog(resolve, reject, actor, damage).render({ force: true });
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,16 @@ import DamageReductionDialog from '../applications/dialogs/damageReductionDialog
|
|||
import { LevelOptionType } from '../data/levelTier.mjs';
|
||||
import DHFeature from '../data/item/feature.mjs';
|
||||
|
||||
<<<<<<< HEAD
|
||||
export default class DhpActor extends Actor {
|
||||
// Return the first active player with the ownership
|
||||
|
||||
/**
|
||||
* Return the first Actor active owner.
|
||||
*/
|
||||
get owner() {
|
||||
const user = this.hasPlayerOwner && game.users?.players.find(p => p.active && this.ownership[p.id ?? ""] === CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER);
|
||||
const user = this.hasPlayerOwner && game.users.players.find(u => this.testUserPermission(u, "OWNER") && u.active);;
|
||||
if(!user) return game.user.isGM ? game.user : null;
|
||||
return user;
|
||||
=======
|
||||
export default class DhpActor extends foundry.documents.Actor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this actor is an NPC.
|
||||
|
|
@ -20,7 +21,6 @@ export default class DhpActor extends foundry.documents.Actor {
|
|||
*/
|
||||
get isNPC() {
|
||||
return this.system.metadata.isNPC;
|
||||
>>>>>>> main
|
||||
}
|
||||
|
||||
async _preCreate(data, options, user) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue