diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 2da66c0c..57481d92 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -133,14 +133,15 @@ export class RdDActorSheet extends ActorSheet { // Update Inventory Item html.find('.item-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getOwnedItem(li.data("itemId")); + const item = this.actor.getOwnedItem(li.data("item-id")); item.sheet.render(true); }); // Delete Inventory Item html.find('.item-delete').click(ev => { const li = $(ev.currentTarget).parents(".item"); - this.actor.deleteOwnedItem(li.data("itemId")); + this.actor.deleteOwnedItem(li.data("item-id")); + console.log("Delete item :", li.data("item-id") ); li.slideUp(200, () => this.render(false)); }); @@ -170,7 +171,7 @@ export class RdDActorSheet extends ActorSheet { // Equip Inventory Item html.find('.item-equip').click(ev => { const li = $(ev.currentTarget).parents(".item"); - this.actor.equiperObjet(li.data("itemId")); + this.actor.equiperObjet(li.data("item-id")); this.render(true); }); diff --git a/system.json b/system.json index 65fff84a..b4a8fbf8 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.21", + "version": "0.9.22", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "0.7.5", "templateVersion": 38, diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 2eea75d4..b4a3edef 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -404,8 +404,12 @@ Sorts: