Fix deprecated use of isPC

This is a patch to the DND5E system pulled from the DND5E gitlab site
This commit is contained in:
supervj 2020-11-25 13:52:30 -05:00
parent 719709d516
commit 3fae34cc43
2 changed files with 3 additions and 3 deletions

View file

@ -549,7 +549,7 @@ export default class Actor5e extends Actor {
async createOwnedItem(itemData, options) { async createOwnedItem(itemData, options) {
// Assume NPCs are always proficient with weapons and always have powers prepared // Assume NPCs are always proficient with weapons and always have powers prepared
if ( !this.isPC ) { if ( !this.hasPlayerOwner ) {
let t = itemData.type; let t = itemData.type;
let initial = {}; let initial = {};
if ( t === "weapon" ) initial["data.proficient"] = true; if ( t === "weapon" ) initial["data.proficient"] = true;

View file

@ -1,6 +1,6 @@
/** /**
* A specialized form used to select from a checklist of attributes, traits, or properties * A specialized form used to select from a checklist of attributes, traits, or properties
* @extends {FormApplication} * @implements {FormApplication}
*/ */
export default class TraitSelector extends FormApplication { export default class TraitSelector extends FormApplication {
@ -36,7 +36,7 @@ export default class TraitSelector extends FormApplication {
getData() { getData() {
// Get current values // Get current values
let attr = getProperty(this.object.data, this.attribute) || {}; let attr = getProperty(this.object._data, this.attribute) || {};
attr.value = attr.value || []; attr.value = attr.value || [];
// Populate choices // Populate choices