Skip to content

Commit

Permalink
Remove version before adding to equipmentspec proto (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
1337LutZ committed Aug 3, 2024
1 parent 7597c28 commit 870a2e1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ui/core/components/importers.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -534,6 +543,7 @@ export class IndividualAddonImporter<SpecType extends Spec> extends Importer {

const gearJson = importJson['gear'];
gearJson.items = (gearJson.items as Array<any>).filter(item => item != null);
delete gearJson.version;
(gearJson.items as Array<any>).forEach(item => {
if (item.gems) {
item.gems = (item.gems as Array<any>).map(gem => gem || 0);
Expand Down

0 comments on commit 870a2e1

Please sign in to comment.