From fd8a961e109e0a551eb3842a58a2a8e772401ab7 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sat, 2 Dec 2023 11:43:02 -0800 Subject: [PATCH] Raid sim uses auto rotation by default --- ui/core/individual_sim_ui.ts | 15 +++++---------- ui/core/player.ts | 8 +++----- ui/raid/import_export.ts | 19 ++++++------------- ui/raid/presets.ts | 34 ---------------------------------- ui/raid/raid_picker.ts | 35 +++++++++++++++++------------------ 5 files changed, 31 insertions(+), 80 deletions(-) diff --git a/ui/core/individual_sim_ui.ts b/ui/core/individual_sim_ui.ts index ae2871a28d..648d4c06fd 100644 --- a/ui/core/individual_sim_ui.ts +++ b/ui/core/individual_sim_ui.ts @@ -140,7 +140,7 @@ export interface IndividualSimUIConfig { rotations?: Array, }, - autoRotation?: AutoRotationGenerator, + autoRotation: AutoRotationGenerator, simpleRotation?: SimpleRotationGenerator, } @@ -184,12 +184,7 @@ export abstract class IndividualSimUI extends SimUI { this.prevEpIterations = 0; this.prevEpSimResult = null; - if (aplLaunchStatuses[player.spec] >= LaunchStatus.Beta) { - if (!config.autoRotation) { - throw new Error('autoRotation is required for APL beta'); - } - player.setAutoRotationGenerator(config.autoRotation); - } + player.setAutoRotationGenerator(config.autoRotation); if (aplLaunchStatuses[player.spec] == LaunchStatus.Launched && config.simpleRotation) { player.setSimpleRotationGenerator(config.simpleRotation); } @@ -330,7 +325,7 @@ export abstract class IndividualSimUI extends SimUI { this.player.setName(initEventID, 'Player'); // This needs to go last so it doesn't re-store things as they are initialized. - this.changeEmitter.on(eventID => { + this.changeEmitter.on(_eventID => { const jsonStr = IndividualSimSettings.toJsonString(this.toProto()); window.localStorage.setItem(this.getSettingsStorageKey(), jsonStr); }); @@ -341,7 +336,7 @@ export abstract class IndividualSimUI extends SimUI { this.raidSimResultsManager = addRaidSimAction(this); addStatWeightsAction(this, this.individualConfig.epStats, this.individualConfig.epPseudoStats, this.individualConfig.epReferenceStat); - const characterStats = new CharacterStats( + const _characterStats = new CharacterStats( this.rootElem.getElementsByClassName('sim-sidebar-footer')[0] as HTMLElement, this.player, this.individualConfig.displayStats, @@ -380,7 +375,7 @@ export abstract class IndividualSimUI extends SimUI { `); - const detailedResults = new EmbeddedDetailedResults(this.rootElem.getElementsByClassName('detailed-results')[0] as HTMLElement, this, this.raidSimResultsManager!); + const _detailedResults = new EmbeddedDetailedResults(this.rootElem.getElementsByClassName('detailed-results')[0] as HTMLElement, this, this.raidSimResultsManager!); } private addTopbarComponents() { diff --git a/ui/core/player.ts b/ui/core/player.ts index dfb021353c..9e5a870a81 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -1546,11 +1546,9 @@ export class Player { })); this.setBonusStats(eventID, new Stats()); - if (aplLaunchStatuses[this.spec] >= LaunchStatus.Beta) { - this.setAplRotation(eventID, APLRotation.create({ - type: APLRotationType.TypeAuto, - })) - } + this.setAplRotation(eventID, APLRotation.create({ + type: APLRotationType.TypeAuto, + })) }); } } diff --git a/ui/raid/import_export.ts b/ui/raid/import_export.ts index dcd1234b49..b514ed44da 100644 --- a/ui/raid/import_export.ts +++ b/ui/raid/import_export.ts @@ -20,7 +20,6 @@ import { professionNames, raceNames } from '../core/proto_utils/names'; import { DruidSpecs, DeathknightSpecs, - MageSpecs, PriestSpecs, RogueSpecs, SpecOptions, @@ -33,7 +32,7 @@ import { import { MAX_NUM_PARTIES } from '../core/raid'; import { Player } from '../core/player'; import { Encounter } from '../core/encounter'; -import { bucket, distinct, sortByProperty } from '../core/utils'; +import { bucket, distinct } from '../core/utils'; import { playerPresets, PresetSpecSettings } from './presets'; import { RaidSimUI } from './raid_sim_ui'; @@ -237,7 +236,7 @@ export class RaidWCLImporter extends Importer { } const urlData = await this.parseURL(importLink); - const rateLimit = await this.getRateLimit(); + const _rateLimit = await this.getRateLimit(); // Schema for WCL API here: https://www.warcraftlogs.com/v2-api-docs/warcraft/ // WCL charges us 1 'point' for each subquery we issue within the request. So @@ -405,7 +404,7 @@ export class RaidWCLImporter extends Importer { otherPartyHealingSpells.forEach(spell => { const spellEvents: Array = healEventsBySpellId[spell.id] || []; const spellEventsByTimestamp = bucket(spellEvents, event => String(event.timestamp) + String(event.sourceID)); - for (const [timestamp, eventsAtTime] of Object.entries(spellEventsByTimestamp)) { + for (const [_timestamp, eventsAtTime] of Object.entries(spellEventsByTimestamp)) { const spellTargets = eventsAtTime.map(event => wclPlayers.find(player => player.id == event.targetID)); for (let i = 0; i < spellTargets.length; i++) { for (let j = 0; j < spellTargets.length; j++) { @@ -492,8 +491,8 @@ export class RaidWCLImporter extends Importer { private getRaidProto(wclPlayers: WCLSimPlayer[]): RaidProto { const raid = RaidProto.create({ - parties: [...new Array(MAX_NUM_PARTIES).keys()].map(p => PartyProto.create({ - players: [...new Array(5).keys()].map(p => PlayerProto.create()), + parties: [...new Array(MAX_NUM_PARTIES).keys()].map(_party => PartyProto.create({ + players: [...new Array(5).keys()].map(_player => PlayerProto.create()), })), }); @@ -564,7 +563,6 @@ class WCLSimPlayer { this.player.setTalentsString(eventID, this.preset.talents.talentsString); this.player.setGlyphs(eventID, this.preset.talents.glyphs!); this.player.setConsumes(eventID, this.preset.consumes); - this.player.setRotation(eventID, this.preset.rotation); this.player.setSpecOptions(eventID, this.preset.specOptions); this.player.setProfessions(eventID, [Profession.Engineering, Profession.Jewelcrafting]); @@ -660,11 +658,6 @@ const fullTypeToSpec: Record = { 'WarriorProtection': Spec.SpecProtectionWarrior, }; -interface QuerySpell { - id: number, - name: string, -} - // Spells which imply a specific Race. const racialSpells: Array<{ id: number, name: string, race: Race }> = [ { id: 25046, name: 'Arcane Torrent (Energy)', race: Race.RaceBloodElf }, @@ -818,7 +811,7 @@ interface wclPlayer { gear: wclGear[]; } -interface wclAura { +interface _wclAura { name: string; id: number; guid: number; diff --git a/ui/raid/presets.ts b/ui/raid/presets.ts index 7197952d21..519f1ff5ff 100644 --- a/ui/raid/presets.ts +++ b/ui/raid/presets.ts @@ -13,7 +13,6 @@ import { getSpecIcon, specNames, SpecOptions, - SpecRotation, } from '../core/proto_utils/utils.js'; import { Player } from '../core/player.js'; @@ -89,7 +88,6 @@ export const specSimFactories: Record { spec: Spec, - rotation: SpecRotation, talents: SavedTalents, specOptions: SpecOptions, consumes: Consumes, @@ -106,7 +104,6 @@ export interface PresetSpecSettings { export const playerPresets: Array> = [ { spec: Spec.SpecTankDeathknight, - rotation: TankDeathknightPresets.DefaultRotation, talents: TankDeathknightPresets.BloodTalents.data, specOptions: TankDeathknightPresets.DefaultOptions, consumes: TankDeathknightPresets.DefaultConsumes, @@ -132,7 +129,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecDeathknight, - rotation: DeathknightPresets.DefaultBloodRotation, talents: DeathknightPresets.BloodTalents.data, specOptions: DeathknightPresets.DefaultBloodOptions, consumes: DeathknightPresets.DefaultConsumes, @@ -160,7 +156,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecDeathknight, - rotation: DeathknightPresets.DefaultFrostRotation, talents: DeathknightPresets.FrostTalents.data, specOptions: DeathknightPresets.DefaultFrostOptions, consumes: DeathknightPresets.DefaultConsumes, @@ -189,7 +184,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecDeathknight, - rotation: DeathknightPresets.DefaultUnholyRotation, talents: DeathknightPresets.UnholyDualWieldTalents.data, specOptions: DeathknightPresets.DefaultUnholyOptions, consumes: DeathknightPresets.DefaultConsumes, @@ -218,7 +212,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecBalanceDruid, - rotation: BalanceDruidPresets.DefaultRotation, talents: BalanceDruidPresets.Phase2Talents.data, specOptions: BalanceDruidPresets.DefaultOptions, consumes: BalanceDruidPresets.DefaultConsumes, @@ -247,7 +240,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecFeralDruid, - rotation: FeralDruidPresets.DefaultRotation, talents: FeralDruidPresets.StandardTalents.data, specOptions: FeralDruidPresets.DefaultOptions, consumes: FeralDruidPresets.DefaultConsumes, @@ -275,7 +267,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecFeralTankDruid, - rotation: FeralTankDruidPresets.DefaultSimpleRotation, talents: FeralTankDruidPresets.StandardTalents.data, specOptions: FeralTankDruidPresets.DefaultOptions, consumes: FeralTankDruidPresets.DefaultConsumes, @@ -301,7 +292,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecRestorationDruid, - rotation: RestorationDruidPresets.DefaultRotation, talents: RestorationDruidPresets.CelestialFocusTalents.data, specOptions: RestorationDruidPresets.DefaultOptions, consumes: RestorationDruidPresets.DefaultConsumes, @@ -327,7 +317,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHunter, - rotation: HunterPresets.DefaultRotation, talents: HunterPresets.BeastMasteryTalents.data, specOptions: HunterPresets.BMDefaultOptions, consumes: HunterPresets.DefaultConsumes, @@ -357,7 +346,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHunter, - rotation: HunterPresets.DefaultRotation, talents: HunterPresets.MarksmanTalents.data, specOptions: HunterPresets.DefaultOptions, consumes: HunterPresets.DefaultConsumes, @@ -387,7 +375,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHunter, - rotation: HunterPresets.DefaultRotation, talents: HunterPresets.SurvivalTalents.data, specOptions: HunterPresets.DefaultOptions, consumes: HunterPresets.DefaultConsumes, @@ -417,7 +404,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.ArcaneTalents.data, specOptions: MagePresets.DefaultArcaneOptions, consumes: MagePresets.DefaultArcaneConsumes, @@ -446,7 +432,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.FireTalents.data, specOptions: MagePresets.DefaultFireOptions, consumes: MagePresets.DefaultFireConsumes, @@ -475,7 +460,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.FrostfireTalents.data, specOptions: MagePresets.DefaultFFBOptions, consumes: MagePresets.DefaultFireConsumes, @@ -504,7 +488,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecRogue, - rotation: RoguePresets.DefaultRotation, talents: RoguePresets.AssassinationTalents137.data, specOptions: RoguePresets.DefaultOptions, consumes: RoguePresets.DefaultConsumes, @@ -532,7 +515,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecRogue, - rotation: RoguePresets.DefaultRotation, talents: RoguePresets.CombatCQCTalents.data, specOptions: RoguePresets.DefaultOptions, consumes: RoguePresets.DefaultConsumes, @@ -560,7 +542,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecElementalShaman, - rotation: ElementalShamanPresets.DefaultRotation, talents: ElementalShamanPresets.StandardTalents.data, specOptions: ElementalShamanPresets.DefaultOptions, consumes: ElementalShamanPresets.DefaultConsumes, @@ -590,7 +571,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecEnhancementShaman, - rotation: EnhancementShamanPresets.DefaultRotation, talents: EnhancementShamanPresets.StandardTalents.data, specOptions: EnhancementShamanPresets.DefaultOptions, consumes: EnhancementShamanPresets.DefaultConsumes, @@ -618,7 +598,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecRestorationShaman, - rotation: RestorationShamanPresets.DefaultRotation, talents: RestorationShamanPresets.RaidHealingTalents.data, specOptions: RestorationShamanPresets.DefaultOptions, consumes: RestorationShamanPresets.DefaultConsumes, @@ -644,7 +623,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHealingPriest, - rotation: HealingPriestPresets.DiscDefaultRotation, talents: HealingPriestPresets.DiscTalents.data, specOptions: HealingPriestPresets.DefaultOptions, consumes: HealingPriestPresets.DefaultConsumes, @@ -670,7 +648,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHealingPriest, - rotation: HealingPriestPresets.HolyDefaultRotation, talents: HealingPriestPresets.HolyTalents.data, specOptions: HealingPriestPresets.DefaultOptions, consumes: HealingPriestPresets.DefaultConsumes, @@ -696,7 +673,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecShadowPriest, - rotation: ShadowPriestPresets.DefaultRotation, talents: ShadowPriestPresets.StandardTalents.data, specOptions: ShadowPriestPresets.DefaultOptions, consumes: ShadowPriestPresets.DefaultConsumes, @@ -724,7 +700,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecSmitePriest, - rotation: SmitePriestPresets.DefaultRotation, talents: SmitePriestPresets.StandardTalents.data, specOptions: SmitePriestPresets.DefaultOptions, consumes: SmitePriestPresets.DefaultConsumes, @@ -750,7 +725,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecWarrior, - rotation: WarriorPresets.ArmsRotation, talents: WarriorPresets.ArmsTalents.data, specOptions: WarriorPresets.DefaultOptions, consumes: WarriorPresets.DefaultConsumes, @@ -778,7 +752,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecWarrior, - rotation: WarriorPresets.DefaultRotation, talents: WarriorPresets.FuryTalents.data, specOptions: WarriorPresets.DefaultOptions, consumes: WarriorPresets.DefaultConsumes, @@ -806,7 +779,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecProtectionWarrior, - rotation: ProtectionWarriorPresets.DefaultRotation, talents: ProtectionWarriorPresets.StandardTalents.data, specOptions: ProtectionWarriorPresets.DefaultOptions, consumes: ProtectionWarriorPresets.DefaultConsumes, @@ -832,7 +804,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecHolyPaladin, - rotation: HolyPaladinPresets.DefaultRotation, talents: HolyPaladinPresets.StandardTalents.data, specOptions: HolyPaladinPresets.DefaultOptions, consumes: HolyPaladinPresets.DefaultConsumes, @@ -858,7 +829,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecProtectionPaladin, - rotation: ProtectionPaladinPresets.DefaultRotation, talents: ProtectionPaladinPresets.GenericAoeTalents.data, specOptions: ProtectionPaladinPresets.DefaultOptions, consumes: ProtectionPaladinPresets.DefaultConsumes, @@ -884,7 +854,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecRetributionPaladin, - rotation: RetributionPaladinPresets.DefaultRotation, talents: RetributionPaladinPresets.AuraMasteryTalents.data, specOptions: RetributionPaladinPresets.DefaultOptions, consumes: RetributionPaladinPresets.DefaultConsumes, @@ -916,7 +885,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecWarlock, - rotation: WarlockPresets.AfflictionRotation, talents: WarlockPresets.AfflictionTalents.data, specOptions: WarlockPresets.AfflictionOptions, consumes: WarlockPresets.DefaultConsumes, @@ -945,7 +913,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecWarlock, - rotation: WarlockPresets.DemonologyRotation, talents: WarlockPresets.DemonologyTalents.data, specOptions: WarlockPresets.DemonologyOptions, consumes: WarlockPresets.DefaultConsumes, @@ -974,7 +941,6 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecWarlock, - rotation: WarlockPresets.DestructionRotation, talents: WarlockPresets.DestructionTalents.data, specOptions: WarlockPresets.DestructionOptions, consumes: WarlockPresets.DefaultConsumes, diff --git a/ui/raid/raid_picker.ts b/ui/raid/raid_picker.ts index e796a11cdf..949efe0d29 100644 --- a/ui/raid/raid_picker.ts +++ b/ui/raid/raid_picker.ts @@ -62,7 +62,7 @@ export class RaidPicker extends Component { this.newPlayerPicker = new NewPlayerPicker(this.rootElem, this); - const activePartiesSelector = new EnumPicker(raidControls, this.raidSimUI.sim.raid, { + const _activePartiesSelector = new EnumPicker(raidControls, this.raidSimUI.sim.raid, { label: 'Raid Size', labelTooltip: 'Number of players participating in the sim.', values: [ @@ -78,30 +78,30 @@ export class RaidPicker extends Component { }, }); - const factionSelector = new EnumPicker(raidControls, this.newPlayerPicker, { + const _factionSelector = new EnumPicker(raidControls, this.newPlayerPicker, { label: 'Default Faction', labelTooltip: 'Default faction for newly-created players.', values: [ { name: 'Alliance', value: Faction.Alliance }, { name: 'Horde', value: Faction.Horde }, ], - changedEvent: (picker: NewPlayerPicker) => this.raid.sim.factionChangeEmitter, - getValue: (picker: NewPlayerPicker) => this.raid.sim.getFaction(), + changedEvent: (_picker: NewPlayerPicker) => this.raid.sim.factionChangeEmitter, + getValue: (_picker: NewPlayerPicker) => this.raid.sim.getFaction(), setValue: (eventID: EventID, picker: NewPlayerPicker, newValue: Faction) => { this.raid.sim.setFaction(eventID, newValue); }, }); const latestPhaseWithAllPresets = Math.min(...playerPresets.map(preset => Math.max(...Object.keys(preset.defaultGear[Faction.Alliance]).map(k => parseInt(k))))); - const phaseSelector = new EnumPicker(raidControls, this.newPlayerPicker, { + const _phaseSelector = new EnumPicker(raidControls, this.newPlayerPicker, { label: 'Default Gear', labelTooltip: 'Newly-created players will start with approximate BIS gear from this phase.', values: [...Array(latestPhaseWithAllPresets).keys()].map(val => { const phase = val + 1; return { name: 'Phase ' + phase, value: phase }; }), - changedEvent: (picker: NewPlayerPicker) => this.raid.sim.phaseChangeEmitter, - getValue: (picker: NewPlayerPicker) => this.raid.sim.getPhase(), + changedEvent: (_picker: NewPlayerPicker) => this.raid.sim.phaseChangeEmitter, + getValue: (_picker: NewPlayerPicker) => this.raid.sim.getPhase(), setValue: (eventID: EventID, picker: NewPlayerPicker, newValue: number) => { this.raid.sim.setPhase(eventID, newValue); }, @@ -125,7 +125,7 @@ export class RaidPicker extends Component { this.raidSimUI.sim.raid.numActivePartiesChangeEmitter.on(updateActiveParties); updateActiveParties(); - this.rootElem.ondragend = event => { + this.rootElem.ondragend = _event => { // Uncomment to remove player when dropped 'off' the raid. //if (this.currentDragPlayerFromIndex != NEW_PLAYER) { // const playerPicker = this.getPlayerPicker(this.currentDragPlayerFromIndex); @@ -536,20 +536,20 @@ export class PlayerPicker extends Component { } private bindPlayerEvents() { - this.nameElem?.addEventListener('input', event => { + this.nameElem?.addEventListener('input', _event => { this.player?.setName(TypedEvent.nextEventID(), this.nameElem?.value || ''); }); - this.nameElem?.addEventListener('mousedown', event => { + this.nameElem?.addEventListener('mousedown', _event => { this.partyPicker.rootElem.setAttribute('draggable', 'false') }) - this.nameElem?.addEventListener('mouseup', event => { + this.nameElem?.addEventListener('mouseup', _event => { this.partyPicker.rootElem.setAttribute('draggable', 'true') }) const emptyName = 'Unnamed'; - this.nameElem?.addEventListener('focusout', event => { + this.nameElem?.addEventListener('focusout', _event => { if (this.nameElem && !this.nameElem.value) { this.nameElem.value = emptyName; this.player?.setName(TypedEvent.nextEventID(), emptyName); @@ -577,22 +577,22 @@ export class PlayerPicker extends Component { const copyElem = this.rootElem.querySelector('.player-copy') as HTMLElement; const deleteElem = this.rootElem.querySelector('.player-delete') as HTMLElement; - const editTooltip = Tooltip.getOrCreateInstance(editElem); - const copyTooltip = Tooltip.getOrCreateInstance(copyElem); + const _editTooltip = Tooltip.getOrCreateInstance(editElem); + const _copyTooltip = Tooltip.getOrCreateInstance(copyElem); const deleteTooltip = Tooltip.getOrCreateInstance(deleteElem); (this.iconElem as HTMLElement).ondragstart = event => { event.dataTransfer!.setDragImage(this.rootElem, 20, 20); dragStart(event, DragType.Swap) } - editElem.onclick = event => { + editElem.onclick = _event => { new PlayerEditorModal(this.player as Player); }; copyElem.ondragstart = event => { event.dataTransfer!.setDragImage(this.rootElem, 20, 20); dragStart(event, DragType.Copy); } - deleteElem.onclick = event => { + deleteElem.onclick = _event => { deleteTooltip.hide(); this.setPlayer(TypedEvent.nextEventID(), null, DragType.None); } @@ -612,7 +612,7 @@ class PlayerEditorModal extends BaseModal { `); const editorRoot = this.rootElem.getElementsByClassName('player-editor')[0] as HTMLElement; - const individualSim = specSimFactories[player.spec]!(editorRoot, player); + const _individualSim = specSimFactories[player.spec]!(editorRoot, player); } } @@ -668,7 +668,6 @@ class NewPlayerPicker extends Component { const newPlayer = new Player(matchingPreset.spec, this.raidPicker.raid.sim); newPlayer.applySharedDefaults(eventID); newPlayer.setRace(eventID, matchingPreset.defaultFactionRaces[this.raidPicker.getCurrentFaction()]); - newPlayer.setRotation(eventID, matchingPreset.rotation); newPlayer.setTalentsString(eventID, matchingPreset.talents.talentsString); newPlayer.setGlyphs(eventID, matchingPreset.talents.glyphs || Glyphs.create()); newPlayer.setSpecOptions(eventID, matchingPreset.specOptions);