Skip to content

Commit

Permalink
Merge pull request #4115 from wowsims/apl
Browse files Browse the repository at this point in the history
Remove some deprecated uses of getRotation()
  • Loading branch information
jimmyt857 authored Dec 29, 2023
2 parents 0c09282 + 665cbd3 commit e4141c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ui/elemental_shaman/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecElementalShaman, {
updateOn: TypedEvent.onAny([simUI.player.rotationChangeEmitter, simUI.player.currentStatsEmitter]),
getContent: () => {
const hasT62P = simUI.player.getCurrentStats().sets.includes('Skyshatter Regalia (2pc)');
const totems = simUI.player.getRotation().totems!;
const totems = simUI.player.getSpecOptions().totems!;
const hasAll4Totems = totems && totems.earth && totems.air && totems.fire && totems.water;
if (hasT62P && !hasAll4Totems) {
return 'T6 2pc bonus is equipped, but inactive because not all 4 totem types are being used.';
Expand Down
42 changes: 19 additions & 23 deletions ui/raid/raid_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ import {
} from '../core/proto_utils/utils.js';
import { sum } from '../core/utils.js';

import { Hunter_Rotation_StingType as HunterStingType, Hunter_Options_PetType as HunterPetType } from '../core/proto/hunter.js';
import { Hunter_Options_PetType as HunterPetType } from '../core/proto/hunter.js';
import { PaladinAura } from '../core/proto/paladin.js';
import { Rogue_Rotation_Frequency as ExposeFrequency } from '../core/proto/rogue.js';
import { AirTotem, EarthTotem, FireTotem, WaterTotem } from '../core/proto/shaman.js';
import { Warlock_Rotation_Curse as WarlockCurse, Warlock_Options_Summon as WarlockSummon } from '../core/proto/warlock.js';
import { WarriorShout, Warrior_Rotation_SunderArmor as SunderArmor } from '../core/proto/warrior.js';
import { Warlock_Options_Summon as WarlockSummon } from '../core/proto/warlock.js';
import { WarriorShout } from '../core/proto/warrior.js';

import { RaidSimUI } from './raid_sim_ui.js';
import { Tooltip } from 'bootstrap';
Expand Down Expand Up @@ -816,12 +815,12 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Sunder Armor',
actionId: ActionId.fromSpellId(47467),
playerData: playerClass(Class.ClassWarrior, player => player.isSpec(Spec.SpecProtectionWarrior) || (player as Player<Spec.SpecWarrior>).getRotation().sunderArmor == SunderArmor.SunderArmorMaintain),
playerData: playerClass(Class.ClassWarrior),
},
{
label: 'Expose Armor',
actionId: ActionId.fromSpellId(8647),
playerData: playerClass(Class.ClassRogue, player => player.getRotation().exposeArmorFrequency == ExposeFrequency.Maintain),
playerData: playerClass(Class.ClassRogue),
},
{
label: 'Acid Spit',
Expand All @@ -836,13 +835,12 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Faerie Fire',
actionId: ActionId.fromSpellId(770),
playerData: playerClass(Class.ClassDruid, player => player.spec == Spec.SpecFeralTankDruid ||
(player.spec != Spec.SpecRestorationDruid && (player as Player<Spec.SpecBalanceDruid | Spec.SpecFeralDruid>).getRotation().maintainFaerieFire)),
playerData: playerClass(Class.ClassDruid, player => player.spec != Spec.SpecRestorationDruid),
},
{
label: 'Curse of Weakness',
actionId: ActionId.fromSpellId(50511),
playerData: playerClass(Class.ClassWarlock, player => player.getRotation().curse == WarlockCurse.Weakness),
playerData: playerClass(Class.ClassWarlock),
},
{
label: 'Sting',
Expand Down Expand Up @@ -922,14 +920,12 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Improved Scorch',
actionId: ActionId.fromSpellId(12873),
playerData: playerClassAndTalent(Class.ClassMage, 'improvedScorch', player => {
return player.getTalentTree() == 1 && player.getRotation().maintainImprovedScorch;
}),
playerData: playerClassAndTalent(Class.ClassMage, 'improvedScorch'),
},
{
label: 'Winter\'s Chill',
actionId: ActionId.fromSpellId(28593),
playerData: playerClassAndTalent(Class.ClassMage, 'wintersChill', player => player.getTalentTree() == 2),
playerData: playerClassAndTalent(Class.ClassMage, 'wintersChill'),
},
],
},
Expand Down Expand Up @@ -964,7 +960,7 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Curse of Elements',
actionId: ActionId.fromSpellId(47865),
playerData: playerClass(Class.ClassWarlock, player => player.getRotation().curse == WarlockCurse.Elements),
playerData: playerClass(Class.ClassWarlock),
},
],
},
Expand All @@ -984,32 +980,32 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Improved Demoralizing Shout',
actionId: ActionId.fromSpellId(12879),
playerData: playerClassAndTalent(Class.ClassWarrior, 'improvedDemoralizingShout', player => (player.spec == Spec.SpecWarrior && (player as Player<Spec.SpecWarrior>).getRotation().maintainDemoShout) || (player.spec == Spec.SpecProtectionWarrior && (player as Player<Spec.SpecProtectionWarrior>).getRotation().demoShoutChoice != 0)),
playerData: playerClassAndTalent(Class.ClassWarrior, 'improvedDemoralizingShout'),
},
{
label: 'Demoralizing Shout',
actionId: ActionId.fromSpellId(47437),
playerData: playerClassAndMissingTalent(Class.ClassWarrior, 'improvedDemoralizingShout', player => (player.spec == Spec.SpecWarrior && (player as Player<Spec.SpecWarrior>).getRotation().maintainDemoShout) || (player.spec == Spec.SpecProtectionWarrior && (player as Player<Spec.SpecProtectionWarrior>).getRotation().demoShoutChoice != 0)),
playerData: playerClassAndMissingTalent(Class.ClassWarrior, 'improvedDemoralizingShout'),
},
{
label: 'Improved Demoralizing Roar',
actionId: ActionId.fromSpellId(16862),
playerData: playerSpecAndTalent(Spec.SpecFeralTankDruid, 'feralAggression', player => player.getRotation().maintainDemoralizingRoar),
playerData: playerSpecAndTalent(Spec.SpecFeralTankDruid, 'feralAggression'),
},
{
label: 'Demoralizing Roar',
actionId: ActionId.fromSpellId(48560),
playerData: playerSpecAndMissingTalent(Spec.SpecFeralTankDruid, 'feralAggression', player => player.getRotation().maintainDemoralizingRoar),
playerData: playerSpecAndMissingTalent(Spec.SpecFeralTankDruid, 'feralAggression'),
},
{
label: 'Improved Curse of Weakness',
actionId: ActionId.fromSpellId(18180),
playerData: playerClassAndTalent(Class.ClassWarlock, 'improvedCurseOfWeakness', player => player.getRotation().curse == WarlockCurse.Weakness),
playerData: playerClassAndTalent(Class.ClassWarlock, 'improvedCurseOfWeakness'),
},
{
label: 'Curse of Weakness',
actionId: ActionId.fromSpellId(50511),
playerData: playerClassAndTalent(Class.ClassWarlock, 'improvedCurseOfWeakness', player => player.getRotation().curse == WarlockCurse.Weakness),
playerData: playerClassAndMissingTalent(Class.ClassWarlock, 'improvedCurseOfWeakness'),
},
{
label: 'Demoralizing Screech',
Expand All @@ -1024,12 +1020,12 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Improved Thunder Clap',
actionId: ActionId.fromSpellId(12666),
playerData: playerClassAndTalent(Class.ClassWarrior, 'improvedThunderClap', player => (player.spec == Spec.SpecWarrior && (player as Player<Spec.SpecWarrior>).getRotation().maintainThunderClap) || (player.spec == Spec.SpecProtectionWarrior && (player as Player<Spec.SpecProtectionWarrior>).getRotation().thunderClapChoice != 0)),
playerData: playerClassAndTalent(Class.ClassWarrior, 'improvedThunderClap'),
},
{
label: 'Thunder Clap',
actionId: ActionId.fromSpellId(47502),
playerData: playerClassAndMissingTalent(Class.ClassWarrior, 'improvedThunderClap', player => (player.spec == Spec.SpecWarrior && (player as Player<Spec.SpecWarrior>).getRotation().maintainThunderClap) || (player.spec == Spec.SpecProtectionWarrior && (player as Player<Spec.SpecProtectionWarrior>).getRotation().thunderClapChoice != 0)),
playerData: playerClassAndMissingTalent(Class.ClassWarrior, 'improvedThunderClap'),
},
{
label: 'Improved Frost Fever',
Expand Down Expand Up @@ -1064,7 +1060,7 @@ const RAID_STATS_OPTIONS: RaidStatsOptions = {
{
label: 'Scorpid Sting',
actionId: ActionId.fromSpellId(3043),
playerData: playerClass(Class.ClassHunter, player => player.getRotation().sting == HunterStingType.ScorpidSting),
playerData: playerClass(Class.ClassHunter),
},
],
},
Expand Down

0 comments on commit e4141c0

Please sign in to comment.