This commit is contained in:
WBHarry 2025-07-04 01:22:18 +02:00
parent 72dfc54705
commit 266a2806ab
13 changed files with 102 additions and 52 deletions

View file

@ -299,12 +299,10 @@ export const updateActorTokens = async (actor, update) => {
await actor.prototypeToken.update(update);
/* Update the tokens in all scenes belonging to Actor */
for (let scene of game.scenes) {
for (let token of scene.tokens) {
const tokenActor = token.baseActor ?? token.actor;
if (tokenActor?.id === actor.id) {
await token.update(update);
}
for (let token of actor.getDependentTokens()) {
const tokenActor = token.baseActor ?? token.actor;
if (tokenActor?.id === actor.id) {
await token.update(update);
}
}
};