From 870a2e1c040d5f7368561753f55d0662a236e57e Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Sat, 3 Aug 2024 18:26:40 +0200 Subject: [PATCH] Remove version before adding to equipmentspec proto (#4259) --- ui/core/components/importers.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/core/components/importers.ts b/ui/core/components/importers.ts index 23d80f3645..2696a2e8ba 100644 --- a/ui/core/components/importers.ts +++ b/ui/core/components/importers.ts @@ -1,10 +1,19 @@ import { JsonObject } from '@protobuf-ts/runtime'; import { IndividualSimUI } from '../individual_sim_ui'; -import { Class, EquipmentSpec, Glyphs, ItemSlot, ItemSpec, Profession, Race, Spec } from '../proto/common'; +import { + Class, + EquipmentSpec, + Glyphs, + ItemSlot, + ItemSpec, + Profession, + Race, + Spec, +} from '../proto/common'; import { IndividualSimSettings } from '../proto/ui'; import { Database } from '../proto_utils/database'; -import { classNames, nameToClass, nameToProfession, nameToRace } from '../proto_utils/names'; +import { classNames, nameToClass, nameToProfession,nameToRace } from '../proto_utils/names'; import { SimSettingCategories } from '../sim'; import { SimUI } from '../sim_ui'; import { classGlyphsConfig, talentSpellIdsToTalentString } from '../talents/factory'; @@ -534,6 +543,7 @@ export class IndividualAddonImporter extends Importer { const gearJson = importJson['gear']; gearJson.items = (gearJson.items as Array).filter(item => item != null); + delete gearJson.version; (gearJson.items as Array).forEach(item => { if (item.gems) { item.gems = (item.gems as Array).map(gem => gem || 0);