diff --git a/.eslintrc.js b/.eslintrc.js index 42ec48d2a1..51bcdd8d8f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,5 @@ module.exports = { + "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint", "unused-imports" diff --git a/ui/warlock/index.ts b/ui/warlock/index.ts index 24ad956938..722671a349 100644 --- a/ui/warlock/index.ts +++ b/ui/warlock/index.ts @@ -9,4 +9,4 @@ const sim = new Sim(); const player = new Player(Spec.SpecWarlock, sim); sim.raid.setPlayer(TypedEvent.nextEventID(), 0, player); -const simUI = new WarlockSimUI(document.body, player); +new WarlockSimUI(document.body, player); diff --git a/ui/warlock/inputs.ts b/ui/warlock/inputs.ts index 1521cdb7b1..29f2380eb5 100644 --- a/ui/warlock/inputs.ts +++ b/ui/warlock/inputs.ts @@ -11,7 +11,7 @@ import { Warlock_Options_Summon as Summon, } from '../core/proto/warlock.js'; -import { UnitReference, Spec, Glyphs, Debuffs, IndividualBuffs, RaidBuffs, ItemSwap, ItemSlot } from '../core/proto/common.js'; +import { Spec, Glyphs, ItemSlot } from '../core/proto/common.js'; import { ActionId } from '../core/proto_utils/action_id.js'; import { Player } from '../core/player.js'; import { EventID, TypedEvent } from '../core/typed_event.js'; @@ -216,7 +216,6 @@ export const WarlockRotationConfig = { } } newRotation.preset = newValue; - const raid = player.getRaid(); TypedEvent.freezeAllAndDo(() => { if (newValue == RotationPreset.Automatic) { player.setTalentsString(eventID, newTalents); diff --git a/ui/warlock/presets.ts b/ui/warlock/presets.ts index b31b553b8f..e1788e0ba1 100644 --- a/ui/warlock/presets.ts +++ b/ui/warlock/presets.ts @@ -31,7 +31,7 @@ import { WarlockMinorGlyph as MinorGlyph, } from '../core/proto/warlock.js'; -import * as WarlockTooltips from './tooltips.js'; +export const BIS_TOOLTIP = 'This gear preset is inspired from Zephan\'s Affliction guide: https://www.warcrafttavern.com/wotlk/guides/pve-affliction-warlock/'; // Default talents. Uses the wowhead calculator format, make the talents on // https://wowhead.com/wotlk/talent-calc and copy the numbers in the url. @@ -214,7 +214,7 @@ export const SWP_BIS = { }; export const P1_PreBiS_11 = { name: 'Pre-Raid Affliction', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Affliction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":44910,"enchant":3820,"gems":[41285,39998]}, @@ -238,7 +238,7 @@ export const P1_PreBiS_11 = { } export const P1_Preset_Demo_Destro = { name: 'P1 Demo / Destro', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Demonology || player.getRotation().type == RotationType.Destruction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":40421,"enchant":3820,"gems":[41285,40014]}, @@ -265,7 +265,7 @@ export const P1_Preset_Demo_Destro = { // will have only rare gems, but a Lightweave Embroidery on cloak. export const P1_Preset_Affliction = { name: 'P1 Affliction', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Affliction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":40421,"enchant":3820,"gems":[41285,40051]}, @@ -291,7 +291,7 @@ export const P1_Preset_Affliction = { export const P1_PreBiS_14 = { name: 'Pre-Raid', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Demonology || player.getRotation().type == RotationType.Destruction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":44910,"enchant":3820,"gems":[41285,39998]}, @@ -316,7 +316,7 @@ export const P1_PreBiS_14 = { export const P2_Preset_Affliction = { name: 'P2 Affliction', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Affliction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":45497,"enchant":3820,"gems":[41285,45883]}, @@ -341,7 +341,7 @@ export const P2_Preset_Affliction = { export const P2_Preset_Demo_Destro = { name: 'P2 Demo / Destro', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Demonology || player.getRotation().type == RotationType.Destruction, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":45497,"enchant":3820,"gems":[41285,45883]}, @@ -366,7 +366,7 @@ export const P2_Preset_Demo_Destro = { export const P3_Preset_Affliction_Horde = { name: 'P3 Affliction H', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Affliction && player.getFaction() == Faction.Horde, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47796,"enchant":3820,"gems":[41285,40133]}, @@ -391,7 +391,7 @@ export const P3_Preset_Affliction_Horde = { export const P3_Preset_Affliction_Alliance = { name: 'P3 Affliction A', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Affliction && player.getFaction() == Faction.Alliance, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47789,"enchant":3820,"gems":[41285,40133]}, @@ -416,7 +416,7 @@ export const P3_Preset_Affliction_Alliance = { export const P3_Preset_Demo_Horde = { name: 'P3 Demo H', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Demonology && player.getFaction() == Faction.Horde, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47796,"enchant":3820,"gems":[41285,40133]}, @@ -441,7 +441,7 @@ export const P3_Preset_Demo_Horde = { export const P3_Preset_Demo_Alliance = { name: 'P3 Demo A', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Demonology && player.getFaction() == Faction.Alliance, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47789,"enchant":3820,"gems":[41285,40133]}, @@ -466,7 +466,7 @@ export const P3_Preset_Demo_Alliance = { export const P3_Preset_Destro_Horde = { name: 'P3 Destro H', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Destruction && player.getFaction() == Faction.Horde, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47796,"enchant":3820,"gems":[41285,40133]}, @@ -491,7 +491,7 @@ export const P3_Preset_Destro_Horde = { export const P3_Preset_Destro_Alliance = { name: 'P3 Destro A', - tooltip: WarlockTooltips.BIS_TOOLTIP, + tooltip: BIS_TOOLTIP, enableWhen: (player: Player) => player.getRotation().type == RotationType.Destruction && player.getFaction() == Faction.Alliance, gear: EquipmentSpec.fromJsonString(`{"items": [ {"id":47789,"enchant":3820,"gems":[41285,40133]}, @@ -513,31 +513,3 @@ export const P3_Preset_Destro_Alliance = { {"id":45294,"gems":[40155]} ]}`), } - -export const Naked = { - name: 'The Naked Bolt', - gear: EquipmentSpec.fromJsonString(` - {"items": - [ - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {}, - {} - ] - } - `), -} - diff --git a/ui/warlock/sim.ts b/ui/warlock/sim.ts index d07b25c54d..4872e42058 100644 --- a/ui/warlock/sim.ts +++ b/ui/warlock/sim.ts @@ -1,33 +1,14 @@ import { - RaidBuffs, PartyBuffs, - IndividualBuffs, - Debuffs, Spec, Stat, - TristateEffect, - Race, } from '../core/proto/common.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; import { IndividualSimUI } from '../core/individual_sim_ui.js'; -import { TypedEvent } from '../core/typed_event.js'; - -import { - Warlock, - Warlock_Rotation as WarlockRotation, - WarlockTalents as WarlockTalents, - Warlock_Options as WarlockOptions, - Warlock_Options_Armor as Armor, - Warlock_Options_Summon as Summon, - Warlock_Options_WeaponImbue as WeaponImbue, -} from '../core/proto/warlock.js'; - import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; -import * as Tooltips from '../core/constants/tooltips.js'; - import * as WarlockInputs from './inputs.js'; import * as Presets from './presets.js'; @@ -158,7 +139,6 @@ export class WarlockSimUI extends IndividualSimUI { ], //Preset gear configurations that the user can quickly select. gear: [ - // Presets.Naked, Presets.SWP_BIS, Presets.P1_PreBiS_11, Presets.P1_PreBiS_14, diff --git a/ui/warlock/tooltips.ts b/ui/warlock/tooltips.ts deleted file mode 100644 index 08a4ddfa8f..0000000000 --- a/ui/warlock/tooltips.ts +++ /dev/null @@ -1 +0,0 @@ -export const BIS_TOOLTIP = 'This gear preset is inspired from Zephan\'s Affliction guide: https://www.warcrafttavern.com/wotlk/guides/pve-affliction-warlock/';