From 3fae34cc4325d54cf71579fd03911d4259e9fe7b Mon Sep 17 00:00:00 2001 From: supervj <64861570+supervj@users.noreply.github.com> Date: Wed, 25 Nov 2020 13:52:30 -0500 Subject: [PATCH] Fix deprecated use of isPC This is a patch to the DND5E system pulled from the DND5E gitlab site --- module/actor/entity.js | 2 +- module/apps/trait-selector.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/actor/entity.js b/module/actor/entity.js index 0b85921b..c2e75b3a 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -549,7 +549,7 @@ export default class Actor5e extends Actor { async createOwnedItem(itemData, options) { // Assume NPCs are always proficient with weapons and always have powers prepared - if ( !this.isPC ) { + if ( !this.hasPlayerOwner ) { let t = itemData.type; let initial = {}; if ( t === "weapon" ) initial["data.proficient"] = true; diff --git a/module/apps/trait-selector.js b/module/apps/trait-selector.js index a4fc43d7..b3af60d0 100644 --- a/module/apps/trait-selector.js +++ b/module/apps/trait-selector.js @@ -1,6 +1,6 @@ /** * A specialized form used to select from a checklist of attributes, traits, or properties - * @extends {FormApplication} + * @implements {FormApplication} */ export default class TraitSelector extends FormApplication { @@ -36,7 +36,7 @@ export default class TraitSelector extends FormApplication { getData() { // Get current values - let attr = getProperty(this.object.data, this.attribute) || {}; + let attr = getProperty(this.object._data, this.attribute) || {}; attr.value = attr.value || []; // Populate choices