Fixed deletion of characters in the world locking up the party actor

This commit is contained in:
WBHarry 2025-11-13 19:24:15 +01:00
parent 63e66bd0d3
commit 013085299f
5 changed files with 36 additions and 4 deletions

View file

@ -672,9 +672,19 @@ export default class DhCharacter extends BaseDataActor {
if (this.companion) {
this.companion.updateLevel(1);
}
if (this.parent.parties) {
for (const party of this.parent.parties) {
await party.update({
'system.partyMembers': party.system.partyMembers.filter(x => x.uuid !== this.parent.uuid)
});
}
}
}
_getTags() {
return [this.class.value?.name, this.class.subclass?.name, this.community?.name, this.ancestry?.name].filter((t) => !!t);
return [this.class.value?.name, this.class.subclass?.name, this.community?.name, this.ancestry?.name].filter(
t => !!t
);
}
}