Fix targeting

This commit is contained in:
Dapoolp 2025-08-13 15:50:03 +02:00
parent b5642db2cd
commit 70feaf72aa
4 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,6 @@
export default class DhpChatMessage extends foundry.documents.ChatMessage {
targetHook = null;
targetSelection = null;
// targetSelection = null;
async renderHTML() {
const actor = game.actors.get(this.speaker.actor);
@ -24,7 +24,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
/** @inheritDoc */
prepareData() {
if (this.isAuthor && this.targetSelection === null) this.targetSelection = this.system.targets?.length > 0;
if (this.isAuthor && this.targetSelection === undefined) this.targetSelection = this.system.targets?.length > 0;
super.prepareData();
}