mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Corrected ChatDamageData and made damage.main nullable
This commit is contained in:
parent
578e6e6c76
commit
ce47c63ce6
4 changed files with 30 additions and 16 deletions
|
|
@ -471,6 +471,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
}
|
||||
|
||||
if (source.damage && source.damage.resources === undefined) {
|
||||
source.damage.main = null;
|
||||
source.damage.resources = {};
|
||||
for (const [partKey, part] of Object.entries(source.damage.parts)) {
|
||||
if (partKey === 'hitPoints') {
|
||||
|
|
@ -484,6 +485,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
source.damage.resources[partKey] = part;
|
||||
}
|
||||
}
|
||||
|
||||
delete source.damage.parts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue