diff --git a/sim/warlock/apl_values.go b/sim/warlock/apl_values.go index 7dfe8f0c36..5db91673eb 100644 --- a/sim/warlock/apl_values.go +++ b/sim/warlock/apl_values.go @@ -50,9 +50,12 @@ func (value *APLValueWarlockShouldRecastDrainSoul) GetBool(sim *core.Simulation) warlock.CurseOfWeaknessAuras.Get(warlock.CurrentTarget).RemainingDuration(sim), ) - warlock.CurseOfAgony.CastTime() - hauntRefresh := warlock.HauntDebuffAuras.Get(warlock.CurrentTarget).RemainingDuration(sim) - - warlock.Haunt.CastTime() - - warlock.Haunt.TravelTime() + hauntRefresh := 1000 * time.Second + if warlock.HauntDebuffAuras != nil { + hauntRefresh = warlock.HauntDebuffAuras.Get(warlock.CurrentTarget).RemainingDuration(sim) - + warlock.Haunt.CastTime() - + warlock.Haunt.TravelTime() + } timeUntilRefresh := min(uaRefresh, curseRefresh) diff --git a/sim/warlock/drain_soul.go b/sim/warlock/drain_soul.go index d7f2fcbdf3..1d6dc28610 100644 --- a/sim/warlock/drain_soul.go +++ b/sim/warlock/drain_soul.go @@ -11,7 +11,6 @@ func (warlock *Warlock) registerDrainSoulSpell() { calcSoulSiphonMult := func(target *core.Unit) float64 { auras := []*core.Aura{ - warlock.HauntDebuffAuras.Get(target), warlock.UnstableAffliction.Dot(target).Aura, warlock.Corruption.Dot(target).Aura, warlock.Seed.Dot(target).Aura, @@ -23,6 +22,9 @@ func (warlock *Warlock) registerDrainSoulSpell() { warlock.ShadowEmbraceDebuffAura(target), // missing: death coil } + if warlock.HauntDebuffAuras != nil { + auras = append(auras, warlock.HauntDebuffAuras.Get(target)) + } numActive := 0 for _, aura := range auras { if aura.IsActive() { diff --git a/sim/warlock/rotation.go b/sim/warlock/rotation.go index 95933e26dc..b30cef6718 100644 --- a/sim/warlock/rotation.go +++ b/sim/warlock/rotation.go @@ -83,7 +83,7 @@ func (warlock *Warlock) setupCooldowns(sim *core.Simulation) { if warlock.Talents.Metamorphosis && spell.ActionID != warlock.Metamorphosis.ActionID { metaCD := warlock.GetMajorCooldown(warlock.Metamorphosis.ActionID) - if !warlock.MetamorphosisAura.IsActive() && metaCD.TimeToNextCast(sim) < spellCD+runTime && + if !warlock.MetamorphosisAura.IsActive() && metaCD != nil && metaCD.TimeToNextCast(sim) < spellCD+runTime && retainUses(timeLeft, spellCD, metaCD.TimeToNextCast(sim)) { return false }