Skip to content

Commit

Permalink
Merge pull request #4023 from Tharre/warlock_bug_fixes
Browse files Browse the repository at this point in the history
Warlock bug fixes
  • Loading branch information
Tharre authored Nov 9, 2023
2 parents 4f1bd6d + 67ca2fb commit b185653
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions sim/warlock/apl_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion sim/warlock/drain_soul.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion sim/warlock/rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b185653

Please sign in to comment.