mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[BUG] - Sending an active effect to chat doesnt work (#727)
Fixes #616 Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
45b3569cba
commit
85982bac8c
7 changed files with 33 additions and 34 deletions
|
|
@ -124,15 +124,20 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
|||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new ChatMessage to display this document’s data.
|
||||
* @param {String} origin - uuid of a document. TODO: This needs to be reviewed.
|
||||
*/
|
||||
async toChat(origin) {
|
||||
/**@type {foundry.documents.ChatMessage} */
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const actor = game.actors.get(cls.getSpeaker().actor);
|
||||
const speaker = cls.getSpeaker();
|
||||
const actor = cls.getSpeakerActor(speaker);
|
||||
const systemData = {
|
||||
action: { img: this.img, name: this.name },
|
||||
actor: { name: actor.name, img: actor.img },
|
||||
author: this.author,
|
||||
speaker: cls.getSpeaker(),
|
||||
origin: origin,
|
||||
actor: { name: actor?.name, img: actor?.img },
|
||||
speaker,
|
||||
origin,
|
||||
description: this.description,
|
||||
actions: []
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue