This commit is contained in:
Dapoolp 2025-07-08 20:42:19 +02:00
parent 62b25ccbfc
commit a3984f30a4
2 changed files with 8 additions and 8 deletions

View file

@ -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) {