From d5f001294db4041e1274f996cad743853184e736 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sun, 21 Jan 2024 11:51:49 -0800 Subject: [PATCH] Remove extraneous calls to WaitForMana() --- sim/hunter/explosive_trap.go | 8 ++------ sim/mage/water_elemental.go | 4 +--- sim/shaman/fire_elemental_pet.go | 1 - sim/warlock/pet.go | 4 +--- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/sim/hunter/explosive_trap.go b/sim/hunter/explosive_trap.go index acd55ed687..1f8999fa1d 100644 --- a/sim/hunter/explosive_trap.go +++ b/sim/hunter/explosive_trap.go @@ -113,11 +113,9 @@ func (hunter *Hunter) registerExplosiveTrapSpell(timer *core.Timer) { hunter.AutoAttacks.DelayRangedUntil(sim, doneAt+time.Millisecond*500) if layTrapAt == sim.CurrentTime { - success := hunter.ExplosiveTrap.Cast(sim, target) + hunter.ExplosiveTrap.Cast(sim, target) if doneAt > hunter.GCD.ReadyAt() { hunter.GCD.Set(doneAt) - } else if !success { - hunter.WaitForMana(sim, hunter.ExplosiveTrap.CurCast.Cost) } } else { // Make sure the GCD doesn't get used while we're waiting. @@ -127,11 +125,9 @@ func (hunter *Hunter) registerExplosiveTrapSpell(timer *core.Timer) { DoAt: layTrapAt, OnAction: func(sim *core.Simulation) { hunter.GCD.Reset() - success := hunter.ExplosiveTrap.Cast(sim, target) + hunter.ExplosiveTrap.Cast(sim, target) if doneAt > hunter.GCD.ReadyAt() { hunter.GCD.Set(doneAt) - } else if !success { - hunter.WaitForMana(sim, hunter.ExplosiveTrap.CurCast.Cost) } }, }) diff --git a/sim/mage/water_elemental.go b/sim/mage/water_elemental.go index 5fd71e77d7..6ff0423806 100644 --- a/sim/mage/water_elemental.go +++ b/sim/mage/water_elemental.go @@ -97,9 +97,7 @@ func (we *WaterElemental) ExecuteCustomRotation(sim *core.Simulation) { return } - if success := spell.Cast(sim, we.CurrentTarget); !success { - we.WaitForMana(sim, spell.CurCast.Cost) - } + spell.Cast(sim, we.CurrentTarget) } // These numbers are just rough guesses based on looking at some logs. diff --git a/sim/shaman/fire_elemental_pet.go b/sim/shaman/fire_elemental_pet.go index 879a5e56dc..6cc7a0a007 100644 --- a/sim/shaman/fire_elemental_pet.go +++ b/sim/shaman/fire_elemental_pet.go @@ -103,7 +103,6 @@ func (fireElemental *FireElemental) ExecuteCustomRotation(sim *core.Simulation) } if fireElemental.FireNova.DefaultCast.Cost > fireElemental.CurrentMana() { - fireElemental.WaitForMana(sim, fireElemental.FireNova.DefaultCast.Cost) return } diff --git a/sim/warlock/pet.go b/sim/warlock/pet.go index 16bcb49c3e..bdcd0c0645 100644 --- a/sim/warlock/pet.go +++ b/sim/warlock/pet.go @@ -303,9 +303,7 @@ func (wp *WarlockPet) ExecuteCustomRotation(sim *core.Simulation) { return } - if success := wp.primaryAbility.Cast(sim, wp.CurrentTarget); !success { - wp.WaitForMana(sim, wp.primaryAbility.CurCast.Cost) - } + wp.primaryAbility.Cast(sim, wp.CurrentTarget) } func (warlock *Warlock) makeStatInheritance() core.PetStatInheritance {