mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
.
This commit is contained in:
parent
013085299f
commit
cd8e9f5f12
7 changed files with 66 additions and 44 deletions
|
|
@ -85,6 +85,17 @@ export default class DhpActor extends Actor {
|
|||
this.updateSource({ prototypeToken });
|
||||
}
|
||||
|
||||
/**@inheritdoc */
|
||||
async _preDelete() {
|
||||
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)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_onUpdate(changes, options, userId) {
|
||||
super._onUpdate(changes, options, userId);
|
||||
for (const party of this.parties) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue