use getOwnedItem instead of getEmbeddedEntity
This commit is contained in:
parent
6fac2c597f
commit
61213d399e
1 changed files with 2 additions and 2 deletions
|
@ -64,8 +64,8 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
|
||||||
|
|
||||||
html.find(".item-equip").on("click", (ev) => {
|
html.find(".item-equip").on("click", (ev) => {
|
||||||
const id = $(ev.currentTarget).parents(".item").data("itemId");
|
const id = $(ev.currentTarget).parents(".item").data("itemId");
|
||||||
const item = duplicate(this.actor.getEmbeddedEntity("OwnedItem", id));
|
const item = duplicate(this.actor.getOwnedItem(id)); // getOwnedItem is typed incorrectly, it actually returns a ItemData<DS4ItemDataType>, not an Item
|
||||||
setProperty(item, "data.equipped", !getProperty(item, "data.equipped"));
|
setProperty(item, "data.equipped", !getProperty(item, "data.equipped")); // TODO: use "."" accessors instead, once typing has been fixed
|
||||||
this.actor.updateOwnedItem(item);
|
this.actor.updateOwnedItem(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue