From abf449aba51cc4cc1150efe40bb6d967eddd769a Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sun, 3 Dec 2023 19:48:26 -0800 Subject: [PATCH] Merge raid sim preset configs into individual sim configs so they're easier to manage --- ui/balance_druid/sim.ts | 44 +- ui/core/individual_sim_ui.ts | 18 + ui/core/player.ts | 10 +- ui/core/proto_utils/utils.ts | 1 - ui/deathknight/sim.ts | 89 ++- ui/elemental_shaman/sim.ts | 53 +- ui/enhancement_shaman/sim.ts | 50 +- ui/feral_druid/sim.ts | 68 ++- ui/feral_tank_druid/sim.ts | 56 +- ui/healing_priest/sim.ts | 75 ++- ui/holy_paladin/sim.ts | 53 +- ui/hunter/sim.ts | 97 +++- ui/mage/sim.ts | 99 +++- ui/protection_paladin/sim.ts | 53 +- ui/protection_warrior/sim.ts | 37 ++ ui/raid/import_export.ts | 7 +- ui/raid/presets.ts | 1032 +-------------------------------- ui/restoration_druid/sim.ts | 43 +- ui/restoration_shaman/sim.ts | 53 +- ui/retribution_paladin/sim.ts | 55 +- ui/rogue/sim.ts | 67 +++ ui/shadow_priest/sim.ts | 37 ++ ui/smite_priest/sim.ts | 46 +- ui/tank_deathknight/sim.ts | 54 +- ui/warlock/sim.ts | 100 ++++ ui/warrior/sim.ts | 67 +++ 26 files changed, 1248 insertions(+), 1116 deletions(-) diff --git a/ui/balance_druid/sim.ts b/ui/balance_druid/sim.ts index 069cced2c8..768be09c72 100644 --- a/ui/balance_druid/sim.ts +++ b/ui/balance_druid/sim.ts @@ -1,9 +1,15 @@ -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; +import { + Class, + Faction, + Race, + Spec, + Stat, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { Player } from '../core/player.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; @@ -134,6 +140,40 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecBalanceDruid, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_PRESET_P3_APL.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecBalanceDruid, + tooltip: specNames[Spec.SpecBalanceDruid], + defaultName: 'Balance', + iconUrl: getSpecIcon(Class.ClassDruid, 0), + + talents: Presets.Phase2Talents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + otherDefaults: Presets.OtherDefaults, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceTauren, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET_ALLI.gear, + 4: Presets.P4_PRESET_ALLI.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET_HORDE.gear, + 4: Presets.P4_PRESET_HORDE.gear, + }, + }, + }, + ], }); export class BalanceDruidSimUI extends IndividualSimUI { diff --git a/ui/core/individual_sim_ui.ts b/ui/core/individual_sim_ui.ts index 059b8b4e1f..85eba58ff0 100644 --- a/ui/core/individual_sim_ui.ts +++ b/ui/core/individual_sim_ui.ts @@ -22,6 +22,7 @@ import { Debuffs, Encounter as EncounterProto, EquipmentSpec, + Faction, Glyphs, HandType, IndividualBuffs, @@ -88,6 +89,21 @@ export interface OtherDefaults { nibelungAverageCasts?: number, } +export interface RaidSimPreset { + spec: Spec, + talents: SavedTalents, + specOptions: SpecOptions, + consumes: Consumes, + + defaultName: string, + defaultFactionRaces: Record, + defaultGear: Record>, + otherDefaults?: OtherDefaults, + + tooltip: string, + iconUrl: string, +} + export interface IndividualSimUIConfig extends PlayerConfig { // Additional css class to add to the root element. cssClass: string, @@ -139,6 +155,8 @@ export interface IndividualSimUIConfig extends PlayerConf talents: Array, SavedTalents>>, rotations: Array, }, + + raidSimPresets: Array>, } export function registerSpecConfig(spec: SpecType, config: IndividualSimUIConfig): IndividualSimUIConfig { diff --git a/ui/core/player.ts b/ui/core/player.ts index 92adc23b0e..da967b3a24 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -220,6 +220,14 @@ export function registerSpecConfig(spec: Spec, config: PlayerConfig) { SPEC_CONFIGS[spec] = config; } +export function getSpecConfig(spec: SpecType): PlayerConfig { + const config = SPEC_CONFIGS[spec] as PlayerConfig; + if (!config) { + throw new Error('No config registered for Spec: ' + spec); + } + return config; +} + // Manages all the gear / consumes / other settings for a single Player. export class Player { readonly sim: Sim; @@ -702,7 +710,7 @@ export class Player { const meleeCrit = (this.currentStats.finalStats?.stats[Stat.StatMeleeCrit] || 0.0) / Mechanics.MELEE_CRIT_RATING_PER_CRIT_CHANCE; const meleeHit = (this.currentStats.finalStats?.stats[Stat.StatMeleeHit] || 0.0) / Mechanics.MELEE_HIT_RATING_PER_HIT_CHANCE; const expertise = (this.currentStats.finalStats?.stats[Stat.StatExpertise] || 0.0) / Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION / 4; - const agility = (this.currentStats.finalStats?.stats[Stat.StatAgility] || 0.0) / this.getClass(); + //const agility = (this.currentStats.finalStats?.stats[Stat.StatAgility] || 0.0) / this.getClass(); const suppression = 4.8; const glancing = 24.0; diff --git a/ui/core/proto_utils/utils.ts b/ui/core/proto_utils/utils.ts index 403ddfba4d..650c413a41 100644 --- a/ui/core/proto_utils/utils.ts +++ b/ui/core/proto_utils/utils.ts @@ -119,7 +119,6 @@ export type ClassSpecs = export const NUM_SPECS = getEnumValues(Spec).length; // The order in which specs should be presented, when it matters. -// Currently this is only used for the order of the paladin blessings UI. export const naturalSpecOrder: Array = [ Spec.SpecBalanceDruid, Spec.SpecFeralDruid, diff --git a/ui/deathknight/sim.ts b/ui/deathknight/sim.ts index 0a46dbd2ac..27e429b130 100644 --- a/ui/deathknight/sim.ts +++ b/ui/deathknight/sim.ts @@ -1,14 +1,22 @@ +import { + Class, + Debuffs, + Faction, + HandType, + IndividualBuffs, + ItemSlot, + PartyBuffs, + PseudoStat, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation } from '../core/proto/apl.js'; -import { HandType, RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { ItemSlot } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as IconInputs from '../core/components/icon_inputs.js'; @@ -244,6 +252,71 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDeathknight, { //Presets.P1_UNHOLY_2H_PRESET, ], }, + + raidSimPresets: [ + { + spec: Spec.SpecDeathknight, + tooltip: 'Frost Death Knight', + defaultName: 'Frost', + iconUrl: getSpecIcon(Class.ClassDeathknight, 1), + + talents: Presets.FrostTalents.data, + specOptions: Presets.DefaultFrostOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_FROST_PRESET.gear, + 2: Presets.P2_FROST_PRESET.gear, + 3: Presets.P3_FROST_PRESET.gear, + 4: Presets.P4_FROST_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_FROST_PRESET.gear, + 2: Presets.P2_FROST_PRESET.gear, + 3: Presets.P3_FROST_PRESET.gear, + 4: Presets.P4_FROST_PRESET.gear, + }, + }, + otherDefaults: Presets.OtherDefaults, + }, + { + spec: Spec.SpecDeathknight, + tooltip: 'Dual-Wield Unholy DK', + defaultName: 'Unholy', + iconUrl: getSpecIcon(Class.ClassDeathknight, 2), + + talents: Presets.UnholyDualWieldTalents.data, + specOptions: Presets.DefaultUnholyOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_UNHOLY_DW_PRESET.gear, + 2: Presets.P2_UNHOLY_DW_PRESET.gear, + 3: Presets.P3_UNHOLY_DW_PRESET.gear, + 4: Presets.P4_UNHOLY_DW_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_UNHOLY_DW_PRESET.gear, + 2: Presets.P2_UNHOLY_DW_PRESET.gear, + 3: Presets.P3_UNHOLY_DW_PRESET.gear, + 4: Presets.P4_UNHOLY_DW_PRESET.gear, + }, + }, + otherDefaults: Presets.OtherDefaults, + }, + ], }); export class DeathknightSimUI extends IndividualSimUI { diff --git a/ui/elemental_shaman/sim.ts b/ui/elemental_shaman/sim.ts index 31c765daec..3b7d819970 100644 --- a/ui/elemental_shaman/sim.ts +++ b/ui/elemental_shaman/sim.ts @@ -1,15 +1,21 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; import { TotemsSection } from '../core/components/totem_inputs.js'; @@ -174,6 +180,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecElementalShaman, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_PRESET_DEFAULT.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecElementalShaman, + tooltip: specNames[Spec.SpecElementalShaman], + defaultName: 'Elemental', + iconUrl: getSpecIcon(Class.ClassShaman, 0), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDraenei, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET_ALLI.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET_HORDE.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class ElementalShamanSimUI extends IndividualSimUI { diff --git a/ui/enhancement_shaman/sim.ts b/ui/enhancement_shaman/sim.ts index 9145a39340..fd7dd4746a 100644 --- a/ui/enhancement_shaman/sim.ts +++ b/ui/enhancement_shaman/sim.ts @@ -1,14 +1,21 @@ -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Faction, + IndividualBuffs, + PartyBuffs, + PseudoStat, + Race, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { ShamanImbue } from '../core/proto/shaman.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TotemsSection } from '../core/components/totem_inputs.js'; import * as IconInputs from '../core/components/icon_inputs.js'; @@ -185,6 +192,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, { return Presets.ROTATION_WF_DEFAULT.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecEnhancementShaman, + tooltip: specNames[Spec.SpecEnhancementShaman], + defaultName: 'Enhancement', + iconUrl: getSpecIcon(Class.ClassShaman, 1), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDraenei, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET_FT.gear, + 3: Presets.P3_PRESET_ALLIANCE.gear, + 4: Presets.P4_PRESET_FT.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET_FT.gear, + 3: Presets.P3_PRESET_HORDE.gear, + 4: Presets.P4_PRESET_FT.gear, + }, + }, + }, + ], }); export class EnhancementShamanSimUI extends IndividualSimUI { diff --git a/ui/feral_druid/sim.ts b/ui/feral_druid/sim.ts index fd3e77f31b..f7e8d9f568 100644 --- a/ui/feral_druid/sim.ts +++ b/ui/feral_druid/sim.ts @@ -1,18 +1,25 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' -import { Stats } from '../core/proto_utils/stats.js'; -import { Player } from '../core/player.js'; +import { + Class, + Debuffs, + Faction, + GemColor, + IndividualBuffs, + ItemSlot, + PartyBuffs, + Profession, + PseudoStat, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; -import { TypedEvent } from '../core/typed_event.js'; import { Gear } from '../core/proto_utils/gear.js'; -import { ItemSlot } from '../core/proto/common.js'; -import { GemColor } from '../core/proto/common.js'; -import { Profession } from '../core/proto/common.js'; +import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; +import { TypedEvent } from '../core/typed_event.js'; +import { Player } from '../core/player.js'; import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; @@ -164,7 +171,40 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFeralDruid, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_PRESET_LEGACY_DEFAULT.rotation.rotation!; - } + }, + + raidSimPresets: [ + { + spec: Spec.SpecFeralDruid, + tooltip: specNames[Spec.SpecFeralDruid], + defaultName: 'Cat', + iconUrl: getSpecIcon(Class.ClassDruid, 3), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceTauren, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class FeralDruidSimUI extends IndividualSimUI { diff --git a/ui/feral_tank_druid/sim.ts b/ui/feral_tank_druid/sim.ts index c050d12f6f..9b183be642 100644 --- a/ui/feral_tank_druid/sim.ts +++ b/ui/feral_tank_druid/sim.ts @@ -1,17 +1,24 @@ -import { Cooldowns } from '../core/proto/common.js'; -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Cooldowns, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + PseudoStat, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLAction, APLListItem, APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { Player } from '../core/player.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; @@ -234,6 +241,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFeralTankDruid, { })) }); }, + + raidSimPresets: [ + { + spec: Spec.SpecFeralTankDruid, + tooltip: specNames[Spec.SpecFeralTankDruid], + defaultName: 'Bear', + iconUrl: getSpecIcon(Class.ClassDruid, 1), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceTauren, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class FeralTankDruidSimUI extends IndividualSimUI { diff --git a/ui/healing_priest/sim.ts b/ui/healing_priest/sim.ts index de2bc9dd81..ec5c3f207d 100644 --- a/ui/healing_priest/sim.ts +++ b/ui/healing_priest/sim.ts @@ -1,8 +1,14 @@ -import { PartyBuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; +import { + Class, + Faction, + PartyBuffs, + Race, + Spec, + Stat, +} from '../core/proto/common.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { APLRotation, @@ -129,6 +135,69 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecHealingPriest, { return Presets.ROTATION_PRESET_HOLY.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecHealingPriest, + tooltip: 'Discipline Priest', + defaultName: 'Discipline', + iconUrl: getSpecIcon(Class.ClassPriest, 0), + + talents: Presets.DiscTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDwarf, + [Faction.Horde]: Race.RaceUndead, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.DISC_P1_PRESET.gear, + 2: Presets.DISC_P2_PRESET.gear, + 3: Presets.DISC_P3_PRESET.gear, + 4: Presets.DISC_P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.DISC_P1_PRESET.gear, + 2: Presets.DISC_P2_PRESET.gear, + 3: Presets.DISC_P3_PRESET.gear, + 4: Presets.DISC_P4_PRESET.gear, + }, + }, + }, + { + spec: Spec.SpecHealingPriest, + tooltip: 'Holy Priest', + defaultName: 'Holy', + iconUrl: getSpecIcon(Class.ClassPriest, 1), + + talents: Presets.HolyTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDwarf, + [Faction.Horde]: Race.RaceUndead, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.HOLY_P1_PRESET.gear, + 2: Presets.HOLY_P2_PRESET.gear, + 3: Presets.HOLY_P3_PRESET.gear, + 4: Presets.HOLY_P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.HOLY_P1_PRESET.gear, + 2: Presets.HOLY_P2_PRESET.gear, + 3: Presets.HOLY_P3_PRESET.gear, + 4: Presets.HOLY_P4_PRESET.gear, + }, + }, + }, + ], }); export class HealingPriestSimUI extends IndividualSimUI { diff --git a/ui/holy_paladin/sim.ts b/ui/holy_paladin/sim.ts index f4c387e1a6..f2eaa896bb 100644 --- a/ui/holy_paladin/sim.ts +++ b/ui/holy_paladin/sim.ts @@ -1,15 +1,21 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as OtherInputs from '../core/components/other_inputs.js'; @@ -157,6 +163,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecHolyPaladin, { autoRotation: (_player: Player): APLRotation => { return APLRotation.create(); }, + + raidSimPresets: [ + { + spec: Spec.SpecHolyPaladin, + tooltip: 'Holy Paladin', + defaultName: 'Holy', + iconUrl: getSpecIcon(Class.ClassPaladin, 0), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceBloodElf, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class HolyPaladinSimUI extends IndividualSimUI { diff --git a/ui/hunter/sim.ts b/ui/hunter/sim.ts index 4b9755859e..7850a97c33 100644 --- a/ui/hunter/sim.ts +++ b/ui/hunter/sim.ts @@ -1,6 +1,8 @@ import { + Class, Cooldowns, Debuffs, + Faction, IndividualBuffs, ItemSlot, PartyBuffs, @@ -18,7 +20,7 @@ import { } from '../core/proto/apl.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; -import { getTalentPoints } from '../core/proto_utils/utils.js'; +import { getTalentPoints, getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; import { getPetTalentsConfig } from '../core/talents/hunter_pet.js'; @@ -363,6 +365,99 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecHunter, { })) }); }, + + raidSimPresets: [ + { + spec: Spec.SpecHunter, + tooltip: 'Beast Mastery Hunter', + defaultName: 'Beast Mastery', + iconUrl: getSpecIcon(Class.ClassHunter, 0), + + talents: Presets.BeastMasteryTalents.data, + specOptions: Presets.BMDefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.MM_P1_PRESET.gear, + 2: Presets.MM_P2_PRESET.gear, + 3: Presets.MM_P3_PRESET.gear, + 4: Presets.MM_P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.MM_P1_PRESET.gear, + 2: Presets.MM_P2_PRESET.gear, + 3: Presets.MM_P3_PRESET.gear, + 4: Presets.MM_P4_PRESET.gear, + }, + }, + }, + { + spec: Spec.SpecHunter, + tooltip: 'Marksmanship Hunter', + defaultName: 'Marksmanship', + iconUrl: getSpecIcon(Class.ClassHunter, 1), + + talents: Presets.MarksmanTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.MM_P1_PRESET.gear, + 2: Presets.MM_P2_PRESET.gear, + 3: Presets.MM_P3_PRESET.gear, + 4: Presets.MM_P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.MM_P1_PRESET.gear, + 2: Presets.MM_P2_PRESET.gear, + 3: Presets.MM_P3_PRESET.gear, + 4: Presets.MM_P4_PRESET.gear, + }, + }, + }, + { + spec: Spec.SpecHunter, + tooltip: 'Survival Hunter', + defaultName: 'Survival', + iconUrl: getSpecIcon(Class.ClassHunter, 2), + + talents: Presets.SurvivalTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.SV_P1_PRESET.gear, + 2: Presets.SV_P2_PRESET.gear, + 3: Presets.SV_P3_PRESET.gear, + 4: Presets.SV_P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.SV_P1_PRESET.gear, + 2: Presets.SV_P2_PRESET.gear, + 3: Presets.SV_P3_PRESET.gear, + 4: Presets.SV_P4_PRESET.gear, + }, + }, + }, + ], }); export class HunterSimUI extends IndividualSimUI { diff --git a/ui/mage/sim.ts b/ui/mage/sim.ts index 878f912486..964ada82ba 100644 --- a/ui/mage/sim.ts +++ b/ui/mage/sim.ts @@ -1,6 +1,7 @@ -import {Cooldowns, Debuffs, IndividualBuffs, PartyBuffs, RaidBuffs, Spec, Stat, TristateEffect} from '../core/proto/common.js'; +import {Class, Cooldowns, Debuffs, Faction, IndividualBuffs, PartyBuffs, Race, RaidBuffs, Spec, Stat, TristateEffect} from '../core/proto/common.js'; import {APLAction, APLListItem, APLPrepullAction, APLRotation} from '../core/proto/apl.js'; import {Stats} from '../core/proto_utils/stats.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import {Player} from '../core/player.js'; import {IndividualSimUI, registerSpecConfig} from '../core/individual_sim_ui.js'; import { @@ -292,6 +293,102 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecMage, { })) }); }, + + raidSimPresets: [ + { + spec: Spec.SpecMage, + tooltip: 'Arcane Mage', + defaultName: 'Arcane', + iconUrl: getSpecIcon(Class.ClassMage, 0), + + talents: Presets.ArcaneTalents.data, + specOptions: Presets.DefaultArcaneOptions, + consumes: Presets.DefaultArcaneConsumes, + otherDefaults: Presets.OtherDefaults, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceGnome, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.ARCANE_P1_PRESET.gear, + 2: Presets.ARCANE_P2_PRESET.gear, + 3: Presets.ARCANE_P3_PRESET_ALLIANCE.gear, + 4: Presets.ARCANE_P4_PRESET_ALLIANCE.gear, + }, + [Faction.Horde]: { + 1: Presets.ARCANE_P1_PRESET.gear, + 2: Presets.ARCANE_P2_PRESET.gear, + 3: Presets.ARCANE_P3_PRESET_HORDE.gear, + 4: Presets.ARCANE_P4_PRESET_HORDE.gear, + }, + }, + }, + { + spec: Spec.SpecMage, + tooltip: 'TTW Fire Mage', + defaultName: 'TTW Fire', + iconUrl: getSpecIcon(Class.ClassMage, 1), + + talents: Presets.FireTalents.data, + specOptions: Presets.DefaultFireOptions, + consumes: Presets.DefaultFireConsumes, + otherDefaults: Presets.OtherDefaults, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceGnome, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.FIRE_P1_PRESET.gear, + 2: Presets.FIRE_P2_PRESET.gear, + 3: Presets.FIRE_P3_PRESET_ALLIANCE.gear, + 4: Presets.FIRE_P4_PRESET_ALLIANCE.gear, + }, + [Faction.Horde]: { + 1: Presets.FIRE_P1_PRESET.gear, + 2: Presets.FIRE_P2_PRESET.gear, + 3: Presets.FIRE_P3_PRESET_HORDE.gear, + 4: Presets.FIRE_P4_PRESET_HORDE.gear, + }, + }, + }, + { + spec: Spec.SpecMage, + tooltip: 'FFB Fire Mage', + defaultName: 'FFB Fire', + iconUrl: "https://wow.zamimg.com/images/wow/icons/medium/ability_mage_frostfirebolt.jpg", + + talents: Presets.FrostfireTalents.data, + specOptions: Presets.DefaultFFBOptions, + consumes: Presets.DefaultFireConsumes, + otherDefaults: Presets.OtherDefaults, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceGnome, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.FIRE_P1_PRESET.gear, + 2: Presets.FFB_P2_PRESET.gear, + 3: Presets.FFB_P3_PRESET_ALLIANCE.gear, + 4: Presets.FFB_P4_PRESET_ALLIANCE.gear, + }, + [Faction.Horde]: { + 1: Presets.FIRE_P1_PRESET.gear, + 2: Presets.FFB_P2_PRESET.gear, + 3: Presets.FFB_P3_PRESET_HORDE.gear, + 4: Presets.FFB_P4_PRESET_HORDE.gear, + }, + }, + }, + ], }); export class MageSimUI extends IndividualSimUI { diff --git a/ui/protection_paladin/sim.ts b/ui/protection_paladin/sim.ts index 02aef11e11..b2a5d605c7 100644 --- a/ui/protection_paladin/sim.ts +++ b/ui/protection_paladin/sim.ts @@ -1,15 +1,21 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + Race, + RaidBuffs, + Spec, + Stat, PseudoStat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; @@ -233,6 +239,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionPaladin, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_DEFAULT.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecProtectionPaladin, + tooltip: 'Protection Paladin', + defaultName: 'Protection', + iconUrl: getSpecIcon(Class.ClassPaladin, 1), + + talents: Presets.GenericAoeTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceBloodElf, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class ProtectionPaladinSimUI extends IndividualSimUI { diff --git a/ui/protection_warrior/sim.ts b/ui/protection_warrior/sim.ts index 45634c4ea4..e63f82bd7a 100644 --- a/ui/protection_warrior/sim.ts +++ b/ui/protection_warrior/sim.ts @@ -1,8 +1,11 @@ import { + Class, Cooldowns, Debuffs, + Faction, IndividualBuffs, PartyBuffs, + Race, RaidBuffs, Spec, Stat, @@ -18,6 +21,7 @@ import { } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { ProtectionWarrior_Rotation as ProtectionWarriorRotation } from '../core/proto/warrior.js'; @@ -248,6 +252,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionWarrior, { })) }); }, + + raidSimPresets: [ + { + spec: Spec.SpecProtectionWarrior, + tooltip: 'Protection Warrior', + defaultName: 'Protection', + iconUrl: getSpecIcon(Class.ClassWarrior, 2), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_BALANCED_PRESET.gear, + 2: Presets.P2_SURVIVAL_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_BALANCED_PRESET.gear, + 2: Presets.P2_SURVIVAL_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class ProtectionWarriorSimUI extends IndividualSimUI { diff --git a/ui/raid/import_export.ts b/ui/raid/import_export.ts index b514ed44da..a3cb44f500 100644 --- a/ui/raid/import_export.ts +++ b/ui/raid/import_export.ts @@ -30,11 +30,12 @@ import { playerToSpec, } from '../core/proto_utils/utils'; import { MAX_NUM_PARTIES } from '../core/raid'; +import { RaidSimPreset } from '../core/individual_sim_ui'; import { Player } from '../core/player'; import { Encounter } from '../core/encounter'; import { bucket, distinct } from '../core/utils'; -import { playerPresets, PresetSpecSettings } from './presets'; +import { playerPresets } from './presets'; import { RaidSimUI } from './raid_sim_ui'; export class RaidJsonImporter extends Importer { @@ -524,7 +525,7 @@ class WCLSimPlayer { private readonly spec: Spec | null; readonly player: Player; - readonly preset: PresetSpecSettings; + readonly preset: RaidSimPreset; inferredProfessions: Array = []; @@ -577,7 +578,7 @@ class WCLSimPlayer { }))); } - private static getMatchingPreset(spec: Spec, talents: wclTalents[]): PresetSpecSettings { + private static getMatchingPreset(spec: Spec, talents: wclTalents[]): RaidSimPreset { const matchingPresets = playerPresets.filter((preset) => preset.spec == spec); let presetIdx = 0; diff --git a/ui/raid/presets.ts b/ui/raid/presets.ts index 7fb9bf7035..859e354b8a 100644 --- a/ui/raid/presets.ts +++ b/ui/raid/presets.ts @@ -1,43 +1,13 @@ -import { IndividualSimUI, OtherDefaults } from '../core/individual_sim_ui.js'; +import { IndividualSimUI, IndividualSimUIConfig, RaidSimPreset } from '../core/individual_sim_ui.js'; import { - Class, - Consumes, - EquipmentSpec, - Faction, - Race, Spec } from '../core/proto/common.js'; -import { SavedTalents } from '../core/proto/ui.js'; import { - getSpecIcon, - specNames, - SpecOptions, + naturalSpecOrder, } from '../core/proto_utils/utils.js'; -import { Player } from '../core/player.js'; - -import * as TankDeathknightPresets from '../tank_deathknight/presets.js'; -import * as DeathknightPresets from '../deathknight/presets.js'; -import * as BalanceDruidPresets from '../balance_druid/presets.js'; -import * as FeralDruidPresets from '../feral_druid/presets.js'; -import * as FeralTankDruidPresets from '../feral_tank_druid/presets.js'; -import * as RestorationDruidPresets from '../restoration_druid/presets.js'; -import * as ElementalShamanPresets from '../elemental_shaman/presets.js'; -import * as EnhancementShamanPresets from '../enhancement_shaman/presets.js'; -import * as RestorationShamanPresets from '../restoration_shaman/presets.js'; -import * as HunterPresets from '../hunter/presets.js'; -import * as MagePresets from '../mage/presets.js'; -import * as RoguePresets from '../rogue/presets.js'; -import * as HolyPaladinPresets from '../holy_paladin/presets.js'; -import * as ProtectionPaladinPresets from '../protection_paladin/presets.js'; -import * as RetributionPaladinPresets from '../retribution_paladin/presets.js'; -import * as HealingPriestPresets from '../healing_priest/presets.js'; -import * as ShadowPriestPresets from '../shadow_priest/presets.js'; -import * as SmitePriestPresets from '../smite_priest/presets.js'; -import * as WarriorPresets from '../warrior/presets.js'; -import * as ProtectionWarriorPresets from '../protection_warrior/presets.js'; -import * as WarlockPresets from '../warlock/presets.js'; +import { Player, getSpecConfig } from '../core/player.js'; import { TankDeathknightSimUI } from '../tank_deathknight/sim.js'; import { DeathknightSimUI } from '../deathknight/sim.js'; @@ -85,994 +55,12 @@ export const specSimFactories: Record) => new WarlockSimUI(parentElem, player), }; -// Configuration necessary for creating new players. -export interface PresetSpecSettings { - spec: Spec, - talents: SavedTalents, - specOptions: SpecOptions, - consumes: Consumes, - - defaultName: string, - defaultFactionRaces: Record, - defaultGear: Record>, - otherDefaults?: OtherDefaults, - - tooltip: string, - iconUrl: string, -} - -export const playerPresets: Array> = [ - { - spec: Spec.SpecTankDeathknight, - tooltip: 'Blood Tank Death Knight', - defaultName: 'Blood Tank', - iconUrl: getSpecIcon(Class.ClassDeathknight, 0), - - talents: TankDeathknightPresets.BloodTalents.data, - specOptions: TankDeathknightPresets.DefaultOptions, - consumes: TankDeathknightPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: TankDeathknightPresets.P1_BLOOD_PRESET.gear, - 2: TankDeathknightPresets.P2_BLOOD_PRESET.gear, - 3: TankDeathknightPresets.P3_BLOOD_PRESET.gear, - 4: TankDeathknightPresets.P4_BLOOD_PRESET.gear, - }, - [Faction.Horde]: { - 1: TankDeathknightPresets.P1_BLOOD_PRESET.gear, - 2: TankDeathknightPresets.P2_BLOOD_PRESET.gear, - 3: TankDeathknightPresets.P3_BLOOD_PRESET.gear, - 4: TankDeathknightPresets.P4_BLOOD_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecDeathknight, - tooltip: 'Blood DPS Death Knight', - defaultName: 'Blood DPS', - iconUrl: getSpecIcon(Class.ClassDeathknight, 3), - - talents: DeathknightPresets.BloodTalents.data, - specOptions: DeathknightPresets.DefaultBloodOptions, - consumes: DeathknightPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: DeathknightPresets.P1_BLOOD_PRESET.gear, - 2: DeathknightPresets.P2_BLOOD_PRESET.gear, - 3: DeathknightPresets.P3_BLOOD_PRESET.gear, - 4: DeathknightPresets.P4_BLOOD_PRESET.gear, - }, - [Faction.Horde]: { - 1: DeathknightPresets.P1_BLOOD_PRESET.gear, - 2: DeathknightPresets.P2_BLOOD_PRESET.gear, - 3: DeathknightPresets.P3_BLOOD_PRESET.gear, - 4: DeathknightPresets.P4_BLOOD_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecDeathknight, - tooltip: 'Frost Death Knight', - defaultName: 'Frost', - iconUrl: getSpecIcon(Class.ClassDeathknight, 1), - - talents: DeathknightPresets.FrostTalents.data, - specOptions: DeathknightPresets.DefaultFrostOptions, - consumes: DeathknightPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: DeathknightPresets.P1_FROST_PRESET.gear, - 2: DeathknightPresets.P2_FROST_PRESET.gear, - 3: DeathknightPresets.P3_FROST_PRESET.gear, - 4: DeathknightPresets.P4_FROST_PRESET.gear, - }, - [Faction.Horde]: { - 1: DeathknightPresets.P1_FROST_PRESET.gear, - 2: DeathknightPresets.P2_FROST_PRESET.gear, - 3: DeathknightPresets.P3_FROST_PRESET.gear, - 4: DeathknightPresets.P4_FROST_PRESET.gear, - }, - }, - otherDefaults: DeathknightPresets.OtherDefaults, - }, - { - spec: Spec.SpecDeathknight, - tooltip: 'Dual-Wield Unholy DK', - defaultName: 'Unholy', - iconUrl: getSpecIcon(Class.ClassDeathknight, 2), - - talents: DeathknightPresets.UnholyDualWieldTalents.data, - specOptions: DeathknightPresets.DefaultUnholyOptions, - consumes: DeathknightPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: DeathknightPresets.P1_UNHOLY_DW_PRESET.gear, - 2: DeathknightPresets.P2_UNHOLY_DW_PRESET.gear, - 3: DeathknightPresets.P3_UNHOLY_DW_PRESET.gear, - 4: DeathknightPresets.P4_UNHOLY_DW_PRESET.gear, - }, - [Faction.Horde]: { - 1: DeathknightPresets.P1_UNHOLY_DW_PRESET.gear, - 2: DeathknightPresets.P2_UNHOLY_DW_PRESET.gear, - 3: DeathknightPresets.P3_UNHOLY_DW_PRESET.gear, - 4: DeathknightPresets.P4_UNHOLY_DW_PRESET.gear, - }, - }, - otherDefaults: DeathknightPresets.OtherDefaults, - }, - { - spec: Spec.SpecBalanceDruid, - tooltip: specNames[Spec.SpecBalanceDruid], - defaultName: 'Balance', - iconUrl: getSpecIcon(Class.ClassDruid, 0), - - talents: BalanceDruidPresets.Phase2Talents.data, - specOptions: BalanceDruidPresets.DefaultOptions, - consumes: BalanceDruidPresets.DefaultConsumes, - otherDefaults: BalanceDruidPresets.OtherDefaults, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceTauren, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: BalanceDruidPresets.P1_PRESET.gear, - 2: BalanceDruidPresets.P2_PRESET.gear, - 3: BalanceDruidPresets.P3_PRESET_ALLI.gear, - 4: BalanceDruidPresets.P4_PRESET_ALLI.gear, - }, - [Faction.Horde]: { - 1: BalanceDruidPresets.P1_PRESET.gear, - 2: BalanceDruidPresets.P2_PRESET.gear, - 3: BalanceDruidPresets.P3_PRESET_HORDE.gear, - 4: BalanceDruidPresets.P4_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecFeralDruid, - tooltip: specNames[Spec.SpecFeralDruid], - defaultName: 'Cat', - iconUrl: getSpecIcon(Class.ClassDruid, 3), - - talents: FeralDruidPresets.StandardTalents.data, - specOptions: FeralDruidPresets.DefaultOptions, - consumes: FeralDruidPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceTauren, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: FeralDruidPresets.P1_PRESET.gear, - 2: FeralDruidPresets.P2_PRESET.gear, - 3: FeralDruidPresets.P3_PRESET.gear, - 4: FeralDruidPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: FeralDruidPresets.P1_PRESET.gear, - 2: FeralDruidPresets.P2_PRESET.gear, - 3: FeralDruidPresets.P3_PRESET.gear, - 4: FeralDruidPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecFeralTankDruid, - tooltip: specNames[Spec.SpecFeralTankDruid], - defaultName: 'Bear', - iconUrl: getSpecIcon(Class.ClassDruid, 1), - - talents: FeralTankDruidPresets.StandardTalents.data, - specOptions: FeralTankDruidPresets.DefaultOptions, - consumes: FeralTankDruidPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceTauren, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: FeralTankDruidPresets.P1_PRESET.gear, - 2: FeralTankDruidPresets.P2_PRESET.gear, - 3: FeralTankDruidPresets.P3_PRESET.gear, - 4: FeralTankDruidPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: FeralTankDruidPresets.P1_PRESET.gear, - 2: FeralTankDruidPresets.P2_PRESET.gear, - 3: FeralTankDruidPresets.P3_PRESET.gear, - 4: FeralTankDruidPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecRestorationDruid, - tooltip: specNames[Spec.SpecRestorationDruid], - defaultName: 'Restoration', - iconUrl: getSpecIcon(Class.ClassDruid, 2), - - talents: RestorationDruidPresets.CelestialFocusTalents.data, - specOptions: RestorationDruidPresets.DefaultOptions, - consumes: RestorationDruidPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceTauren, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: RestorationDruidPresets.P1_PRESET.gear, - 2: RestorationDruidPresets.P2_PRESET.gear, - 3: RestorationDruidPresets.P3_PRESET.gear, - 4: RestorationDruidPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: RestorationDruidPresets.P1_PRESET.gear, - 2: RestorationDruidPresets.P2_PRESET.gear, - 3: RestorationDruidPresets.P3_PRESET.gear, - 4: RestorationDruidPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHunter, - tooltip: 'Beast Mastery Hunter', - defaultName: 'Beast Mastery', - iconUrl: getSpecIcon(Class.ClassHunter, 0), - - talents: HunterPresets.BeastMasteryTalents.data, - specOptions: HunterPresets.BMDefaultOptions, - consumes: HunterPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HunterPresets.MM_P1_PRESET.gear, - 2: HunterPresets.MM_P2_PRESET.gear, - 3: HunterPresets.MM_P3_PRESET.gear, - 4: HunterPresets.MM_P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HunterPresets.MM_P1_PRESET.gear, - 2: HunterPresets.MM_P2_PRESET.gear, - 3: HunterPresets.MM_P3_PRESET.gear, - 4: HunterPresets.MM_P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHunter, - tooltip: 'Marksmanship Hunter', - defaultName: 'Marksmanship', - iconUrl: getSpecIcon(Class.ClassHunter, 1), - - talents: HunterPresets.MarksmanTalents.data, - specOptions: HunterPresets.DefaultOptions, - consumes: HunterPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HunterPresets.MM_P1_PRESET.gear, - 2: HunterPresets.MM_P2_PRESET.gear, - 3: HunterPresets.MM_P3_PRESET.gear, - 4: HunterPresets.MM_P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HunterPresets.MM_P1_PRESET.gear, - 2: HunterPresets.MM_P2_PRESET.gear, - 3: HunterPresets.MM_P3_PRESET.gear, - 4: HunterPresets.MM_P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHunter, - tooltip: 'Survival Hunter', - defaultName: 'Survival', - iconUrl: getSpecIcon(Class.ClassHunter, 2), - - talents: HunterPresets.SurvivalTalents.data, - specOptions: HunterPresets.DefaultOptions, - consumes: HunterPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceNightElf, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HunterPresets.SV_P1_PRESET.gear, - 2: HunterPresets.SV_P2_PRESET.gear, - 3: HunterPresets.SV_P3_PRESET.gear, - 4: HunterPresets.SV_P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HunterPresets.SV_P1_PRESET.gear, - 2: HunterPresets.SV_P2_PRESET.gear, - 3: HunterPresets.SV_P3_PRESET.gear, - 4: HunterPresets.SV_P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecMage, - tooltip: 'Arcane Mage', - defaultName: 'Arcane', - iconUrl: getSpecIcon(Class.ClassMage, 0), - - talents: MagePresets.ArcaneTalents.data, - specOptions: MagePresets.DefaultArcaneOptions, - consumes: MagePresets.DefaultArcaneConsumes, - otherDefaults: MagePresets.OtherDefaults, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceGnome, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: MagePresets.ARCANE_P1_PRESET.gear, - 2: MagePresets.ARCANE_P2_PRESET.gear, - 3: MagePresets.ARCANE_P3_PRESET_ALLIANCE.gear, - 4: MagePresets.ARCANE_P4_PRESET_ALLIANCE.gear, - }, - [Faction.Horde]: { - 1: MagePresets.ARCANE_P1_PRESET.gear, - 2: MagePresets.ARCANE_P2_PRESET.gear, - 3: MagePresets.ARCANE_P3_PRESET_HORDE.gear, - 4: MagePresets.ARCANE_P4_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecMage, - tooltip: 'TTW Fire Mage', - defaultName: 'TTW Fire', - iconUrl: getSpecIcon(Class.ClassMage, 1), - - talents: MagePresets.FireTalents.data, - specOptions: MagePresets.DefaultFireOptions, - consumes: MagePresets.DefaultFireConsumes, - otherDefaults: MagePresets.OtherDefaults, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceGnome, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: MagePresets.FIRE_P1_PRESET.gear, - 2: MagePresets.FIRE_P2_PRESET.gear, - 3: MagePresets.FIRE_P3_PRESET_ALLIANCE.gear, - 4: MagePresets.FIRE_P4_PRESET_ALLIANCE.gear, - }, - [Faction.Horde]: { - 1: MagePresets.FIRE_P1_PRESET.gear, - 2: MagePresets.FIRE_P2_PRESET.gear, - 3: MagePresets.FIRE_P3_PRESET_HORDE.gear, - 4: MagePresets.FIRE_P4_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecMage, - tooltip: 'FFB Fire Mage', - defaultName: 'FFB Fire', - iconUrl: "https://wow.zamimg.com/images/wow/icons/medium/ability_mage_frostfirebolt.jpg", - - talents: MagePresets.FrostfireTalents.data, - specOptions: MagePresets.DefaultFFBOptions, - consumes: MagePresets.DefaultFireConsumes, - otherDefaults: MagePresets.OtherDefaults, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceGnome, - [Faction.Horde]: Race.RaceTroll, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: MagePresets.FIRE_P1_PRESET.gear, - 2: MagePresets.FFB_P2_PRESET.gear, - 3: MagePresets.FFB_P3_PRESET_ALLIANCE.gear, - 4: MagePresets.FFB_P4_PRESET_ALLIANCE.gear, - }, - [Faction.Horde]: { - 1: MagePresets.FIRE_P1_PRESET.gear, - 2: MagePresets.FFB_P2_PRESET.gear, - 3: MagePresets.FFB_P3_PRESET_HORDE.gear, - 4: MagePresets.FFB_P4_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecRogue, - tooltip: 'Assassination Rogue', - defaultName: 'Assassination', - iconUrl: getSpecIcon(Class.ClassRogue, 0), - - talents: RoguePresets.AssassinationTalents137.data, - specOptions: RoguePresets.DefaultOptions, - consumes: RoguePresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: RoguePresets.P1_PRESET_ASSASSINATION.gear, - 2: RoguePresets.P2_PRESET_ASSASSINATION.gear, - 3: RoguePresets.P3_PRESET_ASSASSINATION.gear, - 4: RoguePresets.P4_PRESET_ASSASSINATION.gear, - }, - [Faction.Horde]: { - 1: RoguePresets.P1_PRESET_ASSASSINATION.gear, - 2: RoguePresets.P2_PRESET_ASSASSINATION.gear, - 3: RoguePresets.P3_PRESET_ASSASSINATION.gear, - 4: RoguePresets.P4_PRESET_ASSASSINATION.gear, - }, - }, - }, - { - spec: Spec.SpecRogue, - tooltip: 'Combat Rogue', - defaultName: 'Combat', - iconUrl: getSpecIcon(Class.ClassRogue, 1), - - talents: RoguePresets.CombatCQCTalents.data, - specOptions: RoguePresets.DefaultOptions, - consumes: RoguePresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: RoguePresets.P1_PRESET_COMBAT.gear, - 2: RoguePresets.P2_PRESET_COMBAT.gear, - 3: RoguePresets.P3_PRESET_COMBAT.gear, - 4: RoguePresets.P4_PRESET_COMBAT.gear, - }, - [Faction.Horde]: { - 1: RoguePresets.P1_PRESET_COMBAT.gear, - 2: RoguePresets.P2_PRESET_COMBAT.gear, - 3: RoguePresets.P3_PRESET_COMBAT.gear, - 4: RoguePresets.P4_PRESET_COMBAT.gear, - }, - }, - }, - { - spec: Spec.SpecElementalShaman, - tooltip: specNames[Spec.SpecElementalShaman], - defaultName: 'Elemental', - iconUrl: getSpecIcon(Class.ClassShaman, 0), - - talents: ElementalShamanPresets.StandardTalents.data, - specOptions: ElementalShamanPresets.DefaultOptions, - consumes: ElementalShamanPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDraenei, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: ElementalShamanPresets.P1_PRESET.gear, - 2: ElementalShamanPresets.P2_PRESET.gear, - 3: ElementalShamanPresets.P3_PRESET_ALLI.gear, - 4: ElementalShamanPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: ElementalShamanPresets.P1_PRESET.gear, - 2: ElementalShamanPresets.P2_PRESET.gear, - 3: ElementalShamanPresets.P3_PRESET_HORDE.gear, - 4: ElementalShamanPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecEnhancementShaman, - tooltip: specNames[Spec.SpecEnhancementShaman], - defaultName: 'Enhancement', - iconUrl: getSpecIcon(Class.ClassShaman, 1), - - talents: EnhancementShamanPresets.StandardTalents.data, - specOptions: EnhancementShamanPresets.DefaultOptions, - consumes: EnhancementShamanPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDraenei, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: EnhancementShamanPresets.P1_PRESET.gear, - 2: EnhancementShamanPresets.P2_PRESET_FT.gear, - 3: EnhancementShamanPresets.P3_PRESET_ALLIANCE.gear, - 4: EnhancementShamanPresets.P4_PRESET_FT.gear, - }, - [Faction.Horde]: { - 1: EnhancementShamanPresets.P1_PRESET.gear, - 2: EnhancementShamanPresets.P2_PRESET_FT.gear, - 3: EnhancementShamanPresets.P3_PRESET_HORDE.gear, - 4: EnhancementShamanPresets.P4_PRESET_FT.gear, - }, - }, - }, - { - spec: Spec.SpecRestorationShaman, - tooltip: specNames[Spec.SpecRestorationShaman], - defaultName: 'Restoration', - iconUrl: getSpecIcon(Class.ClassShaman, 2), - - talents: RestorationShamanPresets.RaidHealingTalents.data, - specOptions: RestorationShamanPresets.DefaultOptions, - consumes: RestorationShamanPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDraenei, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: RestorationShamanPresets.P1_PRESET.gear, - 2: RestorationShamanPresets.P2_PRESET.gear, - 3: RestorationShamanPresets.P3_PRESET.gear, - 4: RestorationShamanPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: RestorationShamanPresets.P1_PRESET.gear, - 2: RestorationShamanPresets.P2_PRESET.gear, - 3: RestorationShamanPresets.P3_PRESET.gear, - 4: RestorationShamanPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHealingPriest, - tooltip: 'Discipline Priest', - defaultName: 'Discipline', - iconUrl: getSpecIcon(Class.ClassPriest, 0), - - talents: HealingPriestPresets.DiscTalents.data, - specOptions: HealingPriestPresets.DefaultOptions, - consumes: HealingPriestPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDwarf, - [Faction.Horde]: Race.RaceUndead, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HealingPriestPresets.DISC_P1_PRESET.gear, - 2: HealingPriestPresets.DISC_P2_PRESET.gear, - 3: HealingPriestPresets.DISC_P3_PRESET.gear, - 4: HealingPriestPresets.DISC_P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HealingPriestPresets.DISC_P1_PRESET.gear, - 2: HealingPriestPresets.DISC_P2_PRESET.gear, - 3: HealingPriestPresets.DISC_P3_PRESET.gear, - 4: HealingPriestPresets.DISC_P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHealingPriest, - tooltip: 'Holy Priest', - defaultName: 'Holy', - iconUrl: getSpecIcon(Class.ClassPriest, 1), - - talents: HealingPriestPresets.HolyTalents.data, - specOptions: HealingPriestPresets.DefaultOptions, - consumes: HealingPriestPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDwarf, - [Faction.Horde]: Race.RaceUndead, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HealingPriestPresets.HOLY_P1_PRESET.gear, - 2: HealingPriestPresets.HOLY_P2_PRESET.gear, - 3: HealingPriestPresets.HOLY_P3_PRESET.gear, - 4: HealingPriestPresets.HOLY_P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HealingPriestPresets.HOLY_P1_PRESET.gear, - 2: HealingPriestPresets.HOLY_P2_PRESET.gear, - 3: HealingPriestPresets.HOLY_P3_PRESET.gear, - 4: HealingPriestPresets.HOLY_P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecShadowPriest, - tooltip: specNames[Spec.SpecShadowPriest], - defaultName: 'Shadow', - iconUrl: getSpecIcon(Class.ClassPriest, 2), - - talents: ShadowPriestPresets.StandardTalents.data, - specOptions: ShadowPriestPresets.DefaultOptions, - consumes: ShadowPriestPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDwarf, - [Faction.Horde]: Race.RaceUndead, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: ShadowPriestPresets.P1_PRESET.gear, - 2: ShadowPriestPresets.P2_PRESET.gear, - 3: ShadowPriestPresets.P3_PRESET.gear, - 4: ShadowPriestPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: ShadowPriestPresets.P1_PRESET.gear, - 2: ShadowPriestPresets.P2_PRESET.gear, - 3: ShadowPriestPresets.P3_PRESET.gear, - 4: ShadowPriestPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecSmitePriest, - tooltip: specNames[Spec.SpecSmitePriest], - defaultName: 'Smite', - iconUrl: getSpecIcon(Class.ClassPriest, 3), - - talents: SmitePriestPresets.StandardTalents.data, - specOptions: SmitePriestPresets.DefaultOptions, - consumes: SmitePriestPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceDwarf, - [Faction.Horde]: Race.RaceUndead, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: SmitePriestPresets.P1_PRESET.gear, - 2: ShadowPriestPresets.P2_PRESET.gear, - 3: ShadowPriestPresets.P3_PRESET.gear, - 4: ShadowPriestPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: SmitePriestPresets.P1_PRESET.gear, - 2: ShadowPriestPresets.P2_PRESET.gear, - 3: ShadowPriestPresets.P3_PRESET.gear, - 4: ShadowPriestPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecWarrior, - tooltip: 'Arms Warrior', - defaultName: 'Arms', - iconUrl: getSpecIcon(Class.ClassWarrior, 0), - - talents: WarriorPresets.ArmsTalents.data, - specOptions: WarriorPresets.DefaultOptions, - consumes: WarriorPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: WarriorPresets.P1_ARMS_PRESET.gear, - 2: WarriorPresets.P2_ARMS_PRESET.gear, - 3: WarriorPresets.P3_ARMS_4P_PRESET_ALLIANCE.gear, - 4: WarriorPresets.P4_ARMS_PRESET_ALLIANCE.gear, - }, - [Faction.Horde]: { - 1: WarriorPresets.P1_ARMS_PRESET.gear, - 2: WarriorPresets.P2_ARMS_PRESET.gear, - 3: WarriorPresets.P3_ARMS_4P_PRESET_HORDE.gear, - 4: WarriorPresets.P4_ARMS_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecWarrior, - tooltip: 'Fury Warrior', - defaultName: 'Fury', - iconUrl: getSpecIcon(Class.ClassWarrior, 1), - - talents: WarriorPresets.FuryTalents.data, - specOptions: WarriorPresets.DefaultOptions, - consumes: WarriorPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: WarriorPresets.P1_FURY_PRESET.gear, - 2: WarriorPresets.P2_FURY_PRESET.gear, - 3: WarriorPresets.P3_FURY_PRESET_ALLIANCE.gear, - 4: WarriorPresets.P4_FURY_PRESET_ALLIANCE.gear, - }, - [Faction.Horde]: { - 1: WarriorPresets.P1_FURY_PRESET.gear, - 2: WarriorPresets.P2_FURY_PRESET.gear, - 3: WarriorPresets.P3_FURY_PRESET_HORDE.gear, - 4: WarriorPresets.P4_FURY_PRESET_HORDE.gear, - }, - }, - }, - { - spec: Spec.SpecProtectionWarrior, - tooltip: 'Protection Warrior', - defaultName: 'Protection', - iconUrl: getSpecIcon(Class.ClassWarrior, 2), - - talents: ProtectionWarriorPresets.StandardTalents.data, - specOptions: ProtectionWarriorPresets.DefaultOptions, - consumes: ProtectionWarriorPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: ProtectionWarriorPresets.P1_BALANCED_PRESET.gear, - 2: ProtectionWarriorPresets.P2_SURVIVAL_PRESET.gear, - 3: ProtectionWarriorPresets.P3_PRESET.gear, - 4: ProtectionWarriorPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: ProtectionWarriorPresets.P1_BALANCED_PRESET.gear, - 2: ProtectionWarriorPresets.P2_SURVIVAL_PRESET.gear, - 3: ProtectionWarriorPresets.P3_PRESET.gear, - 4: ProtectionWarriorPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecHolyPaladin, - tooltip: 'Holy Paladin', - defaultName: 'Holy', - iconUrl: getSpecIcon(Class.ClassPaladin, 0), - - talents: HolyPaladinPresets.StandardTalents.data, - specOptions: HolyPaladinPresets.DefaultOptions, - consumes: HolyPaladinPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceBloodElf, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: HolyPaladinPresets.P1_PRESET.gear, - 2: HolyPaladinPresets.P2_PRESET.gear, - 3: HolyPaladinPresets.P3_PRESET.gear, - 4: HolyPaladinPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: HolyPaladinPresets.P1_PRESET.gear, - 2: HolyPaladinPresets.P2_PRESET.gear, - 3: HolyPaladinPresets.P3_PRESET.gear, - 4: HolyPaladinPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecProtectionPaladin, - tooltip: 'Protection Paladin', - defaultName: 'Protection', - iconUrl: getSpecIcon(Class.ClassPaladin, 1), - - talents: ProtectionPaladinPresets.GenericAoeTalents.data, - specOptions: ProtectionPaladinPresets.DefaultOptions, - consumes: ProtectionPaladinPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceBloodElf, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: ProtectionPaladinPresets.P1_PRESET.gear, - 2: ProtectionPaladinPresets.P2_PRESET.gear, - 3: ProtectionPaladinPresets.P3_PRESET.gear, - 4: ProtectionPaladinPresets.P4_PRESET.gear, - }, - [Faction.Horde]: { - 1: ProtectionPaladinPresets.P1_PRESET.gear, - 2: ProtectionPaladinPresets.P2_PRESET.gear, - 3: ProtectionPaladinPresets.P3_PRESET.gear, - 4: ProtectionPaladinPresets.P4_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecRetributionPaladin, - tooltip: 'Retribution Paladin', - defaultName: 'Retribution', - iconUrl: getSpecIcon(Class.ClassPaladin, 2), - - talents: RetributionPaladinPresets.AuraMasteryTalents.data, - specOptions: RetributionPaladinPresets.DefaultOptions, - consumes: RetributionPaladinPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceBloodElf, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: RetributionPaladinPresets.P1_PRESET.gear, - 2: RetributionPaladinPresets.P2_PRESET.gear, - 3: RetributionPaladinPresets.P3_PRESET.gear, - 4: RetributionPaladinPresets.P4_PRESET.gear, - 5: RetributionPaladinPresets.P5_PRESET.gear, - }, - [Faction.Horde]: { - 1: RetributionPaladinPresets.P1_PRESET.gear, - 2: RetributionPaladinPresets.P2_PRESET.gear, - 3: RetributionPaladinPresets.P3_PRESET.gear, - 4: RetributionPaladinPresets.P4_PRESET.gear, - 5: RetributionPaladinPresets.P5_PRESET.gear, - }, - }, - }, - { - spec: Spec.SpecWarlock, - tooltip: 'Affliction Warlock', - defaultName: 'Affliction', - iconUrl: getSpecIcon(Class.ClassWarlock, 0), - - talents: WarlockPresets.AfflictionTalents.data, - specOptions: WarlockPresets.AfflictionOptions, - consumes: WarlockPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: WarlockPresets.P1_AFFLICTION_PRESET.gear, - 2: WarlockPresets.P2_AFFLICTION_PRESET.gear, - 3: WarlockPresets.P3_AFFLICTION_ALLIANCE_PRESET.gear, - 4: WarlockPresets.P4_AFFLICTION_PRESET.gear, - }, - [Faction.Horde]: { - 1: WarlockPresets.P1_AFFLICTION_PRESET.gear, - 2: WarlockPresets.P2_AFFLICTION_PRESET.gear, - 3: WarlockPresets.P3_AFFLICTION_HORDE_PRESET.gear, - 4: WarlockPresets.P4_AFFLICTION_PRESET.gear, - }, - }, - otherDefaults: WarlockPresets.OtherDefaults, - }, - { - spec: Spec.SpecWarlock, - tooltip: 'Demonology Warlock', - defaultName: 'Demonology', - iconUrl: getSpecIcon(Class.ClassWarlock, 1), - - talents: WarlockPresets.DemonologyTalents.data, - specOptions: WarlockPresets.DemonologyOptions, - consumes: WarlockPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: WarlockPresets.P1_DEMODESTRO_PRESET.gear, - 2: WarlockPresets.P2_DEMODESTRO_PRESET.gear, - 3: WarlockPresets.P3_DEMO_ALLIANCE_PRESET.gear, - 4: WarlockPresets.P4_DEMO_PRESET.gear, - }, - [Faction.Horde]: { - 1: WarlockPresets.P1_DEMODESTRO_PRESET.gear, - 2: WarlockPresets.P2_DEMODESTRO_PRESET.gear, - 3: WarlockPresets.P3_DEMO_HORDE_PRESET.gear, - 4: WarlockPresets.P4_DEMO_PRESET.gear, - }, - }, - otherDefaults: WarlockPresets.OtherDefaults, - }, - { - spec: Spec.SpecWarlock, - tooltip: 'Destruction Warlock', - defaultName: 'Destruction', - iconUrl: getSpecIcon(Class.ClassWarlock, 2), - - talents: WarlockPresets.DestructionTalents.data, - specOptions: WarlockPresets.DestructionOptions, - consumes: WarlockPresets.DefaultConsumes, - defaultFactionRaces: { - [Faction.Unknown]: Race.RaceUnknown, - [Faction.Alliance]: Race.RaceHuman, - [Faction.Horde]: Race.RaceOrc, - }, - defaultGear: { - [Faction.Unknown]: {}, - [Faction.Alliance]: { - 1: WarlockPresets.P1_DEMODESTRO_PRESET.gear, - 2: WarlockPresets.P2_DEMODESTRO_PRESET.gear, - 3: WarlockPresets.P3_DESTRO_ALLIANCE_PRESET.gear, - 4: WarlockPresets.P4_DESTRO_PRESET.gear, - }, - [Faction.Horde]: { - 1: WarlockPresets.P1_DEMODESTRO_PRESET.gear, - 2: WarlockPresets.P2_DEMODESTRO_PRESET.gear, - 3: WarlockPresets.P3_DESTRO_HORDE_PRESET.gear, - 4: WarlockPresets.P4_DESTRO_PRESET.gear, - }, - }, - otherDefaults: WarlockPresets.OtherDefaults, - }, -]; +export const playerPresets: Array> = naturalSpecOrder + .map(getSpecConfig) + .map(config => { + const indSimUiConfig = config as IndividualSimUIConfig; + return indSimUiConfig.raidSimPresets; + }) + .flat(); export const implementedSpecs: Array = [...new Set(playerPresets.map(preset => preset.spec))]; diff --git a/ui/restoration_druid/sim.ts b/ui/restoration_druid/sim.ts index dad91ec483..e9f140ab81 100644 --- a/ui/restoration_druid/sim.ts +++ b/ui/restoration_druid/sim.ts @@ -1,9 +1,15 @@ -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; +import { + Class, + Faction, + Race, + Spec, + Stat, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { Player } from '../core/player.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as OtherInputs from '../core/components/other_inputs.js'; @@ -117,6 +123,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRestorationDruid, { autoRotation: (_player: Player): APLRotation => { return APLRotation.create(); }, + + raidSimPresets: [ + { + spec: Spec.SpecRestorationDruid, + tooltip: specNames[Spec.SpecRestorationDruid], + defaultName: 'Restoration', + iconUrl: getSpecIcon(Class.ClassDruid, 2), + + talents: Presets.CelestialFocusTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceNightElf, + [Faction.Horde]: Race.RaceTauren, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class RestorationDruidSimUI extends IndividualSimUI { diff --git a/ui/restoration_shaman/sim.ts b/ui/restoration_shaman/sim.ts index 74f6e9546d..19304a0084 100644 --- a/ui/restoration_shaman/sim.ts +++ b/ui/restoration_shaman/sim.ts @@ -1,15 +1,21 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TotemsSection } from '../core/components/totem_inputs.js'; @@ -148,6 +154,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRestorationShaman, { autoRotation: (_player: Player): APLRotation => { return APLRotation.create(); }, + + raidSimPresets: [ + { + spec: Spec.SpecRestorationShaman, + tooltip: specNames[Spec.SpecRestorationShaman], + defaultName: 'Restoration', + iconUrl: getSpecIcon(Class.ClassShaman, 2), + + talents: Presets.RaidHealingTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDraenei, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class RestorationShamanSimUI extends IndividualSimUI { diff --git a/ui/retribution_paladin/sim.ts b/ui/retribution_paladin/sim.ts index 52b1c06596..578bd9b224 100644 --- a/ui/retribution_paladin/sim.ts +++ b/ui/retribution_paladin/sim.ts @@ -1,15 +1,21 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + Race, + RaidBuffs, + Spec, + Stat, PseudoStat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; @@ -221,6 +227,41 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRetributionPaladin, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_PRESET_DEFAULT.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecRetributionPaladin, + tooltip: 'Retribution Paladin', + defaultName: 'Retribution', + iconUrl: getSpecIcon(Class.ClassPaladin, 2), + + talents: Presets.AuraMasteryTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceBloodElf, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + 5: Presets.P5_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + 5: Presets.P5_PRESET.gear, + }, + }, + }, + ], }); export class RetributionPaladinSimUI extends IndividualSimUI { diff --git a/ui/rogue/sim.ts b/ui/rogue/sim.ts index 5b1f5b28cd..50e30cdf2a 100644 --- a/ui/rogue/sim.ts +++ b/ui/rogue/sim.ts @@ -1,9 +1,12 @@ import { + Class, Debuffs, + Faction, IndividualBuffs, ItemSlot, PartyBuffs, PseudoStat, + Race, RaidBuffs, Spec, Stat, @@ -15,6 +18,7 @@ import { } from '../core/proto/apl.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { @@ -415,6 +419,69 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRogue, { return Presets.ROTATION_PRESET_MUTILATE_EXPOSE.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecRogue, + tooltip: 'Assassination Rogue', + defaultName: 'Assassination', + iconUrl: getSpecIcon(Class.ClassRogue, 0), + + talents: Presets.AssassinationTalents137.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET_ASSASSINATION.gear, + 2: Presets.P2_PRESET_ASSASSINATION.gear, + 3: Presets.P3_PRESET_ASSASSINATION.gear, + 4: Presets.P4_PRESET_ASSASSINATION.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET_ASSASSINATION.gear, + 2: Presets.P2_PRESET_ASSASSINATION.gear, + 3: Presets.P3_PRESET_ASSASSINATION.gear, + 4: Presets.P4_PRESET_ASSASSINATION.gear, + }, + }, + }, + { + spec: Spec.SpecRogue, + tooltip: 'Combat Rogue', + defaultName: 'Combat', + iconUrl: getSpecIcon(Class.ClassRogue, 1), + + talents: Presets.CombatCQCTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET_COMBAT.gear, + 2: Presets.P2_PRESET_COMBAT.gear, + 3: Presets.P3_PRESET_COMBAT.gear, + 4: Presets.P4_PRESET_COMBAT.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET_COMBAT.gear, + 2: Presets.P2_PRESET_COMBAT.gear, + 3: Presets.P3_PRESET_COMBAT.gear, + 4: Presets.P4_PRESET_COMBAT.gear, + }, + }, + }, + ], }); export class RogueSimUI extends IndividualSimUI { diff --git a/ui/shadow_priest/sim.ts b/ui/shadow_priest/sim.ts index 8a233e69c8..45d5c2198e 100644 --- a/ui/shadow_priest/sim.ts +++ b/ui/shadow_priest/sim.ts @@ -1,5 +1,8 @@ import { + Class, + Faction, PartyBuffs, + Race, Spec, Stat, } from '../core/proto/common.js'; @@ -9,6 +12,7 @@ import { import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; @@ -158,6 +162,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecShadowPriest, { return Presets.ROTATION_PRESET_DEFAULT.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecShadowPriest, + tooltip: specNames[Spec.SpecShadowPriest], + defaultName: 'Shadow', + iconUrl: getSpecIcon(Class.ClassPriest, 2), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDwarf, + [Faction.Horde]: Race.RaceUndead, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: Presets.P2_PRESET.gear, + 3: Presets.P3_PRESET.gear, + 4: Presets.P4_PRESET.gear, + }, + }, + }, + ], }); export class ShadowPriestSimUI extends IndividualSimUI { diff --git a/ui/smite_priest/sim.ts b/ui/smite_priest/sim.ts index 31e6687a9c..4ab3d1a22e 100644 --- a/ui/smite_priest/sim.ts +++ b/ui/smite_priest/sim.ts @@ -1,17 +1,24 @@ -import { PartyBuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat } from '../core/proto/common.js'; +import { + Class, + Faction, + PartyBuffs, + Race, + Spec, + Stat, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon, specNames } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as OtherInputs from '../core/components/other_inputs.js'; import * as Mechanics from '../core/constants/mechanics.js'; import * as SmitePriestInputs from './inputs.js'; +import * as ShadowPresets from '../shadow_priest/presets.js'; import * as Presets from './presets.js'; const SPEC_CONFIG = registerSpecConfig(Spec.SpecSmitePriest, { @@ -126,6 +133,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecSmitePriest, { autoRotation: (_player: Player): APLRotation => { return Presets.ROTATION_PRESET_APL.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecSmitePriest, + tooltip: specNames[Spec.SpecSmitePriest], + defaultName: 'Smite', + iconUrl: getSpecIcon(Class.ClassPriest, 3), + + talents: Presets.StandardTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceDwarf, + [Faction.Horde]: Race.RaceUndead, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_PRESET.gear, + 2: ShadowPresets.P2_PRESET.gear, + 3: ShadowPresets.P3_PRESET.gear, + 4: ShadowPresets.P4_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_PRESET.gear, + 2: ShadowPresets.P2_PRESET.gear, + 3: ShadowPresets.P3_PRESET.gear, + 4: ShadowPresets.P4_PRESET.gear, + }, + }, + }, + ], }); export class SmitePriestSimUI extends IndividualSimUI { diff --git a/ui/tank_deathknight/sim.ts b/ui/tank_deathknight/sim.ts index 273933f697..5857cfe79e 100644 --- a/ui/tank_deathknight/sim.ts +++ b/ui/tank_deathknight/sim.ts @@ -1,15 +1,22 @@ -import { RaidBuffs } from '../core/proto/common.js'; -import { PartyBuffs } from '../core/proto/common.js'; -import { IndividualBuffs } from '../core/proto/common.js'; -import { Debuffs } from '../core/proto/common.js'; -import { Spec } from '../core/proto/common.js'; -import { Stat, PseudoStat } from '../core/proto/common.js'; -import { TristateEffect } from '../core/proto/common.js' +import { + Class, + Debuffs, + Faction, + IndividualBuffs, + PartyBuffs, + PseudoStat, + Race, + RaidBuffs, + Spec, + Stat, + TristateEffect, +} from '../core/proto/common.js'; import { APLRotation, } from '../core/proto/apl.js'; import { Player } from '../core/player.js'; import { Stats } from '../core/proto_utils/stats.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as IconInputs from '../core/components/icon_inputs.js'; @@ -211,6 +218,39 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecTankDeathknight, { autoRotation: (_player: Player): APLRotation => { return Presets.BLOOD_IT_SPAM_ROTATION_PRESET_DEFAULT.rotation.rotation!; }, + + raidSimPresets: [ + { + spec: Spec.SpecTankDeathknight, + tooltip: 'Blood Tank Death Knight', + defaultName: 'Blood Tank', + iconUrl: getSpecIcon(Class.ClassDeathknight, 0), + + talents: Presets.BloodTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceTroll, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_BLOOD_PRESET.gear, + 2: Presets.P2_BLOOD_PRESET.gear, + 3: Presets.P3_BLOOD_PRESET.gear, + 4: Presets.P4_BLOOD_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_BLOOD_PRESET.gear, + 2: Presets.P2_BLOOD_PRESET.gear, + 3: Presets.P3_BLOOD_PRESET.gear, + 4: Presets.P4_BLOOD_PRESET.gear, + }, + }, + }, + ], }); export class TankDeathknightSimUI extends IndividualSimUI { diff --git a/ui/warlock/sim.ts b/ui/warlock/sim.ts index 9449b02034..7a44e66465 100644 --- a/ui/warlock/sim.ts +++ b/ui/warlock/sim.ts @@ -1,5 +1,8 @@ import { + Class, + Faction, PartyBuffs, + Race, Spec, Stat, } from '../core/proto/common.js'; @@ -9,6 +12,7 @@ import { import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import * as IconInputs from '../core/components/icon_inputs.js'; import * as OtherInputs from '../core/components/other_inputs.js'; @@ -180,6 +184,102 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecWarlock, { return Presets.APL_Destro_Default.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecWarlock, + tooltip: 'Affliction Warlock', + defaultName: 'Affliction', + iconUrl: getSpecIcon(Class.ClassWarlock, 0), + + talents: Presets.AfflictionTalents.data, + specOptions: Presets.AfflictionOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_AFFLICTION_PRESET.gear, + 2: Presets.P2_AFFLICTION_PRESET.gear, + 3: Presets.P3_AFFLICTION_ALLIANCE_PRESET.gear, + 4: Presets.P4_AFFLICTION_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_AFFLICTION_PRESET.gear, + 2: Presets.P2_AFFLICTION_PRESET.gear, + 3: Presets.P3_AFFLICTION_HORDE_PRESET.gear, + 4: Presets.P4_AFFLICTION_PRESET.gear, + }, + }, + otherDefaults: Presets.OtherDefaults, + }, + { + spec: Spec.SpecWarlock, + tooltip: 'Demonology Warlock', + defaultName: 'Demonology', + iconUrl: getSpecIcon(Class.ClassWarlock, 1), + + talents: Presets.DemonologyTalents.data, + specOptions: Presets.DemonologyOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_DEMODESTRO_PRESET.gear, + 2: Presets.P2_DEMODESTRO_PRESET.gear, + 3: Presets.P3_DEMO_ALLIANCE_PRESET.gear, + 4: Presets.P4_DEMO_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_DEMODESTRO_PRESET.gear, + 2: Presets.P2_DEMODESTRO_PRESET.gear, + 3: Presets.P3_DEMO_HORDE_PRESET.gear, + 4: Presets.P4_DEMO_PRESET.gear, + }, + }, + otherDefaults: Presets.OtherDefaults, + }, + { + spec: Spec.SpecWarlock, + tooltip: 'Destruction Warlock', + defaultName: 'Destruction', + iconUrl: getSpecIcon(Class.ClassWarlock, 2), + + talents: Presets.DestructionTalents.data, + specOptions: Presets.DestructionOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_DEMODESTRO_PRESET.gear, + 2: Presets.P2_DEMODESTRO_PRESET.gear, + 3: Presets.P3_DESTRO_ALLIANCE_PRESET.gear, + 4: Presets.P4_DESTRO_PRESET.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_DEMODESTRO_PRESET.gear, + 2: Presets.P2_DEMODESTRO_PRESET.gear, + 3: Presets.P3_DESTRO_HORDE_PRESET.gear, + 4: Presets.P4_DESTRO_PRESET.gear, + }, + }, + otherDefaults: Presets.OtherDefaults, + }, + ], }); export class WarlockSimUI extends IndividualSimUI { diff --git a/ui/warrior/sim.ts b/ui/warrior/sim.ts index 3a2c65c144..227a900193 100644 --- a/ui/warrior/sim.ts +++ b/ui/warrior/sim.ts @@ -1,9 +1,12 @@ import { + Class, Debuffs, + Faction, GemColor, IndividualBuffs, ItemSlot, PartyBuffs, + Race, RaidBuffs, Spec, Stat, PseudoStat, @@ -15,6 +18,7 @@ import { } from '../core/proto/apl.js'; import { Stats } from '../core/proto_utils/stats.js'; import { Player } from '../core/player.js'; +import { getSpecIcon } from '../core/proto_utils/utils.js'; import { IndividualSimUI, registerSpecConfig } from '../core/individual_sim_ui.js'; import { TypedEvent } from '../core/typed_event.js'; import { Gear } from '../core/proto_utils/gear.js'; @@ -207,6 +211,69 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecWarrior, { return Presets.ROTATION_FURY_SUNDER.rotation.rotation!; } }, + + raidSimPresets: [ + { + spec: Spec.SpecWarrior, + tooltip: 'Arms Warrior', + defaultName: 'Arms', + iconUrl: getSpecIcon(Class.ClassWarrior, 0), + + talents: Presets.ArmsTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_ARMS_PRESET.gear, + 2: Presets.P2_ARMS_PRESET.gear, + 3: Presets.P3_ARMS_4P_PRESET_ALLIANCE.gear, + 4: Presets.P4_ARMS_PRESET_ALLIANCE.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_ARMS_PRESET.gear, + 2: Presets.P2_ARMS_PRESET.gear, + 3: Presets.P3_ARMS_4P_PRESET_HORDE.gear, + 4: Presets.P4_ARMS_PRESET_HORDE.gear, + }, + }, + }, + { + spec: Spec.SpecWarrior, + tooltip: 'Fury Warrior', + defaultName: 'Fury', + iconUrl: getSpecIcon(Class.ClassWarrior, 1), + + talents: Presets.FuryTalents.data, + specOptions: Presets.DefaultOptions, + consumes: Presets.DefaultConsumes, + defaultFactionRaces: { + [Faction.Unknown]: Race.RaceUnknown, + [Faction.Alliance]: Race.RaceHuman, + [Faction.Horde]: Race.RaceOrc, + }, + defaultGear: { + [Faction.Unknown]: {}, + [Faction.Alliance]: { + 1: Presets.P1_FURY_PRESET.gear, + 2: Presets.P2_FURY_PRESET.gear, + 3: Presets.P3_FURY_PRESET_ALLIANCE.gear, + 4: Presets.P4_FURY_PRESET_ALLIANCE.gear, + }, + [Faction.Horde]: { + 1: Presets.P1_FURY_PRESET.gear, + 2: Presets.P2_FURY_PRESET.gear, + 3: Presets.P3_FURY_PRESET_HORDE.gear, + 4: Presets.P4_FURY_PRESET_HORDE.gear, + }, + }, + }, + ], }); export class WarriorSimUI extends IndividualSimUI {