This commit is contained in:
sladecraven 2022-01-12 09:19:08 +01:00
parent 9a94798102
commit c28c7d8c0d
3 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.actor.getOwnedItem(li.data("item-id"));
const item = this.actor.items.get(li.data("item-id"));
item.sheet.render(true);
});
// Delete Inventory Item
@ -93,7 +93,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
});
html.find('.item-link a').click((event) => {
const itemId = $(event.currentTarget).data("item-id");
const item = this.actor.getOwnedItem(itemId);
const item = this.actor.items.get(itemId);
item.sheet.render(true);
});
html.find('.item-equip').click(ev => {

View File

@ -75,13 +75,13 @@ export class YggdrasillItemSheet extends ItemSheet {
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.object.options.actor.getOwnedItem(li.data("item-id"));
const item = this.object.options.actor.items.get(li.data("item-id"));
item.sheet.render(true);
});
// Update Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.object.options.actor.deleteOwnedItem( li.data("item-id") ).then( this.render(true));
this.object.options.actor.deleteEmbeddedDocuments( "Item", [li.data("item-id") ] ).then( this.render(true));
});
}

View File

@ -2,7 +2,7 @@
"name": "fvtt-yggdrasill",
"title": "Yggdrasill",
"description": "Système non-officiel Yggdrasill (7ièm Cercle) pour FoundryVTT",
"version": "1.1.4",
"version": "1.1.5",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "9",