From 4dbdc4a6a9794f6bee8663726be074b15e26075a Mon Sep 17 00:00:00 2001 From: "Wendel Henrique (SouOWendel)" Date: Wed, 9 Oct 2024 18:07:10 -0300 Subject: [PATCH] fix(hasAreaTemplate): fixed the condition that checks whether an area template exists --- module/documents/item.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/documents/item.mjs b/module/documents/item.mjs index b5e597c..24e3607 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -155,6 +155,10 @@ export class ShinobiItem extends Item { const rollMode = game.settings.get('core', 'rollMode'); // const label = `[${item.type}] ${item.name}`; const token = this.actor.token; + + let hasAreaTemplate; + hasAreaTemplate = (this.type == "tecnicas" || this.type == "gerais" || this.type == "armas"); + hasAreaTemplate = this.system.areaTemplate.length !== 0; const templateData = { actor: this.actor, @@ -162,7 +166,7 @@ export class ShinobiItem extends Item { item: this, data: await this.getChatData(), labels: this.labels, - hasAreaTemplate: (this.type == "tecnicas" || this.type == "gerais" || this.type == "armas"), + hasAreaTemplate: hasAreaTemplate, system: [], info: [], };