mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Refresh effects display after actor preparation (#1752)
This commit is contained in:
parent
a4fff56461
commit
eb9e47c39d
2 changed files with 12 additions and 1 deletions
|
|
@ -29,6 +29,18 @@ export default class DhpActor extends Actor {
|
|||
return this.system.metadata.isNPC;
|
||||
}
|
||||
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
|
||||
// Update effects if it is the user's character or is controlled
|
||||
if (canvas.ready) {
|
||||
const controlled = canvas.tokens.controlled.some((t) => t.actor === this);
|
||||
if (game.user.character === this || controlled) {
|
||||
ui.effectsDisplay.render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @inheritDoc */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue