From 667edda50ac1491f1abc900de0d953522988d38b Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:04:16 +0200 Subject: [PATCH] Fix/fix weapon damage datas in sheet (#988) * Temp ActionField attack type missing * Move missing attack type to getModel * Fix weapon base attack reseting on update --- module/documents/item.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/documents/item.mjs b/module/documents/item.mjs index fb558e8c..8492f068 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -28,6 +28,14 @@ export default class DHItem extends foundry.documents.Item { return doc; } + /* -------------------------------------------- */ + + /** @inheritDoc */ + static migrateData(source) { + if(source.system?.attack && !source.system.attack.type) source.system.attack.type = "attack"; + return super.migrateData(source); + } + /** * @inheritdoc * @param {object} options - Options which modify the getRollData method.