From 226d48f68d57361c6786f8a193eec44086781e84 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 8 Aug 2023 20:01:13 -0700 Subject: [PATCH] Fix another bug with strict sequences and disable noisy logs --- sim/core/apl.go | 6 +++--- sim/core/spell.go | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sim/core/apl.go b/sim/core/apl.go index 914d6575d2..06edd179bc 100644 --- a/sim/core/apl.go +++ b/sim/core/apl.go @@ -197,10 +197,10 @@ func (apl *APLRotation) getNextAction(sim *Simulation) *APLAction { } for _, action := range apl.priorityList { - if _, ok := action.impl.(*APLActionStrictSequence); ok { - apl.strictSequence = action - } if action.IsReady(sim) { + if _, ok := action.impl.(*APLActionStrictSequence); ok { + apl.strictSequence = action + } return action } } diff --git a/sim/core/spell.go b/sim/core/spell.go index 6e2c3b6de6..913d6c2d78 100644 --- a/sim/core/spell.go +++ b/sim/core/spell.go @@ -428,31 +428,31 @@ func (spell *Spell) CanCast(sim *Simulation, target *Unit) bool { } if spell.ExtraCastCondition != nil && !spell.ExtraCastCondition(sim, target) { - if sim.Log != nil { - sim.Log("Cant cast because of extra condition") - } + //if sim.Log != nil { + // sim.Log("Cant cast because of extra condition") + //} return false } // While casting or channeling, no other action is possible if spell.Unit.Hardcast.Expires > sim.CurrentTime { - if sim.Log != nil { - sim.Log("Cant cast because already casting/channeling") - } + //if sim.Log != nil { + // sim.Log("Cant cast because already casting/channeling") + //} return false } if spell.DefaultCast.GCD > 0 && !spell.Unit.GCD.IsReady(sim) { - if sim.Log != nil { - sim.Log("Cant cast because of GCD") - } + //if sim.Log != nil { + // sim.Log("Cant cast because of GCD") + //} return false } if !BothTimersReady(spell.CD.Timer, spell.SharedCD.Timer, sim) { - if sim.Log != nil { - sim.Log("Cant cast because of CDs") - } + //if sim.Log != nil { + // sim.Log("Cant cast because of CDs") + //} return false } @@ -460,9 +460,9 @@ func (spell *Spell) CanCast(sim *Simulation, target *Unit) bool { // temp hack spell.CurCast.Cost = spell.DefaultCast.Cost if !spell.Cost.MeetsRequirement(spell) { - if sim.Log != nil { - sim.Log("Cant cast because of resource cost") - } + //if sim.Log != nil { + // sim.Log("Cant cast because of resource cost") + //} return false } }