Generic roll and update items

This commit is contained in:
2022-01-13 21:05:55 +01:00
parent 3d70f556fb
commit b4b41f5c96
5 changed files with 63 additions and 18 deletions

View File

@ -200,15 +200,19 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.equipItem( li.data("item-id") );
this.render(true);
});
html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name");
let value = ev.currentTarget.value;
this.actor.update( { [`${fieldName}`]: value } );
});
html.find('.perk-active').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.activatePerk( li.data("item-id") );
this.render(true);
this.render(true);
});
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {