diff --git a/src/module/actor/monster-sheet.js b/src/module/actor/monster-sheet.js index e425f53..b3dfbfd 100644 --- a/src/module/actor/monster-sheet.js +++ b/src/module/actor/monster-sheet.js @@ -136,13 +136,11 @@ export class AcksActorSheetMonster extends AcksActorSheet { } async _resetCounters(event) { - const weapons = this.actor.data.items.filter(i => i.type === 'weapon'); - for (let wp of weapons) { - const item = this.actor.items.get(wp._id); - await item.update({ + for (const weapon of this.actor.itemTypes["weapon"]) { + await weapon.update({ data: { counter: { - value: parseInt(wp.data.counter.max), + value: parseInt(weapon.data.data.counter.max, 10), }, }, }); diff --git a/src/templates/actors/partials/monster-attributes-tab.html b/src/templates/actors/partials/monster-attributes-tab.html index 801b459..c4d15ed 100644 --- a/src/templates/actors/partials/monster-attributes-tab.html +++ b/src/templates/actors/partials/monster-attributes-tab.html @@ -129,10 +129,10 @@ {{#if (eq item.type 'weapon')}}
- / -
{{/if}}