Skip to content

Commit

Permalink
Fix a few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Dec 2, 2023
1 parent 054068f commit 545f156
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sim/shaman/shaman.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (shaman *Shaman) Initialize() {

// Healing stream totem applies a HoT (aura) and so needs to be handled as a pre-pull action
// instead of during init/reset.
if shaman.Totems.Water == proto.WaterTotem_HealingStreamTotem {
if !shaman.IsUsingAPL && shaman.Totems.Water == proto.WaterTotem_HealingStreamTotem {
shaman.RegisterPrepullAction(0, func(sim *core.Simulation) {
shaman.HealingStreamTotem.Cast(sim, &shaman.Unit)
})
Expand Down
3 changes: 0 additions & 3 deletions sim/warrior/protection/protection_warrior.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ func (war *ProtectionWarrior) Initialize() {
war.RegisterShieldBlockCD()
war.DefensiveStanceAura.BuildPhase = core.CharacterBuildPhaseTalents

if !war.IsUsingAPL {
war.CustomRotation = war.makeCustomRotation()
}
if war.Options.UseShatteringThrow {
war.RegisterShatteringThrowCD()
}
Expand Down
12 changes: 6 additions & 6 deletions ui/raid/raid_picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import { Tooltip } from 'bootstrap';

const NEW_PLAYER: number = -1;

const LATEST_PHASE_WITH_ALL_PRESETS = Math.min(...playerPresets.map(preset => Math.max(...Object.keys(preset.defaultGear[Faction.Alliance]).map(k => parseInt(k)))));

enum DragType {
None,
New,
Expand Down Expand Up @@ -92,11 +94,10 @@ export class RaidPicker extends Component {
},
});

const latestPhaseWithAllPresets = Math.min(...playerPresets.map(preset => Math.max(...Object.keys(preset.defaultGear[Faction.Alliance]).map(k => parseInt(k)))));
const _phaseSelector = new EnumPicker<NewPlayerPicker>(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 => {
values: [...Array(LATEST_PHASE_WITH_ALL_PRESETS).keys()].map(val => {
const phase = val + 1;
return { name: 'Phase ' + phase, value: phase };
}),
Expand Down Expand Up @@ -679,10 +680,9 @@ class NewPlayerPicker extends Component {

// Need to wait because the gear might not be loaded yet.
this.raidPicker.raid.sim.waitForInit().then(() => {
newPlayer.setGear(
eventID,
this.raidPicker.raid.sim.db.lookupEquipmentSpec(
matchingPreset.defaultGear[this.raidPicker.getCurrentFaction()][this.raidPicker.getCurrentPhase()]));
const phase = Math.min(this.raidPicker.getCurrentPhase(), LATEST_PHASE_WITH_ALL_PRESETS);
const gearSet = matchingPreset.defaultGear[this.raidPicker.getCurrentFaction()][phase];
newPlayer.setGear(eventID, this.raidPicker.raid.sim.db.lookupEquipmentSpec(gearSet));
});

this.raidPicker.setDragPlayer(newPlayer, NEW_PLAYER, DragType.New);
Expand Down

0 comments on commit 545f156

Please sign in to comment.