Fix items not being rollable in the char sheet
This commit is contained in:
parent
cada51877d
commit
710659510e
2 changed files with 2 additions and 2 deletions
|
@ -309,7 +309,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Options, DS4ActorSheetD
|
|||
*/
|
||||
protected onRollItem(event: JQuery.ClickEvent): void {
|
||||
event.preventDefault();
|
||||
const id = $(event.currentTarget).parents(".item").data("itemId");
|
||||
const id = $(event.currentTarget).parents(".item").data("id");
|
||||
const item = this.actor.items.get(id);
|
||||
enforce(item, getGame().i18n.format("DS4.ErrorActorDoesNotHaveItem", { id, actor: this.actor.name }));
|
||||
item.roll().catch((e) => notifications.error(e, { log: true }));
|
||||
|
|
|
@ -38,7 +38,7 @@ async function getOrCreateRollItemMacro(itemData: foundry.data.ItemData["_source
|
|||
}
|
||||
|
||||
/**
|
||||
* Executes the roll item macro for the given itemId.
|
||||
* Executes the roll item macro for the item associated to the given `itemId`.
|
||||
*/
|
||||
export async function rollItem(itemId: string): Promise<void> {
|
||||
const actor = getActiveActor();
|
||||
|
|
Loading…
Reference in a new issue