Fix a bug where the actor context was not being correctly called unless the user had an actor assigned to them
This commit is contained in:
parent
5b59956016
commit
74d881c3df
2 changed files with 15 additions and 1 deletions
|
|
@ -162,7 +162,14 @@ export class AttributeItemData extends foundry.abstract.TypeDataModel {
|
|||
});
|
||||
};
|
||||
|
||||
await macro?.execute({ item: this.parent });
|
||||
// Get the speaker so that Foundry has the correct context to be able to call
|
||||
// the Actor's getData method, letting us augment the context dynamically for
|
||||
// the @active roll context
|
||||
const speaker = foundry.documents.ChatMessage.implementation.getSpeaker({
|
||||
actor: this.parent.parent
|
||||
});
|
||||
|
||||
await macro?.execute({ item: this.parent, speaker });
|
||||
};
|
||||
// #endregion Methods
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue