Improved registration and unregistration of triggers

This commit is contained in:
WBHarry 2026-01-15 21:52:22 +01:00
parent 9393bab6cf
commit 9fb9ae1b91
5 changed files with 129 additions and 27 deletions

View file

@ -536,4 +536,10 @@ export default class DHToken extends CONFIG.Token.documentClass {
};
}
//#endregion
async _preDelete() {
if (this.actor && !this.actor.prototypeToken?.actorLink) {
game.system.registeredTriggers.unregisterItemTriggers(this.actor.items);
}
}
}