Fixed collection prep order

This commit is contained in:
WBHarry 2026-01-19 22:25:40 +01:00
parent 6f6ee41f0f
commit bd5ef8e8d7
4 changed files with 36 additions and 5 deletions

View file

@ -727,6 +727,19 @@ export default class DhCharacter extends BaseDataActor {
}
}
_onUpdate(changes, options, userId) {
super._onUpdate(changes, options, userId);
if (game.user.id === userId) {
/* Companion updates */
if (this.companion) {
if (changes.system.levelData?.level?.current !== undefined) {
this.companion.update(this.companion.toObject(), { diff: false, recursive: false });
}
}
}
}
async _preDelete() {
super._preDelete();