Add migration for slayer points

This commit is contained in:
Johannes Loher 2021-05-13 20:26:57 +02:00
parent 8cf6db2ba5
commit a2e2aea78b

View file

@ -60,7 +60,14 @@ function getActorUpdateData(actorData: DeepPartial<Actor.Data>) {
return itemData; return itemData;
} }
}); });
return hasItemUpdates ? { items } : undefined; const updateData: Record<string, unknown> = {};
if (actorData.type === "character") {
updateData["data.slayerPoints"] = { value: 0 };
}
if (hasItemUpdates) {
updateData["items"] = items;
}
return updateData;
} }
async function migrateScenes() { async function migrateScenes() {