Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs #4074

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading