More WIP on 0.8.x migration

This commit is contained in:
Johannes Loher 2021-06-30 03:53:52 +02:00
parent ef01698178
commit 6b39284164
16 changed files with 427 additions and 321 deletions

View file

@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT
import { DS4SpellDataData } from "../item/item-data";
import { DS4SpellDataSourceData } from "../item/item-data-source";
import logger from "../logger";
export async function migrate(): Promise<void> {
@ -33,7 +33,7 @@ function getItemUpdateData(itemData: DeepPartial<Item.Data>) {
"-=data.scrollPrice": null,
"data.minimumLevels": { healer: null, wizard: null, sorcerer: null },
};
if (((itemData.data as DS4SpellDataData).cooldownDuration.unit as string) === "custom") {
if (((itemData.data as DS4SpellDataSourceData).cooldownDuration.unit as string) === "custom") {
updateData["data.cooldownDuration.unit"] = "rounds";
}
return updateData;