From c9e5a2281f7563c667748bc52e4f23b073a0d51c Mon Sep 17 00:00:00 2001 From: DominicJamesWhite Date: Sat, 20 May 2023 12:32:33 +0200 Subject: [PATCH] Update bone_shield.go Bone shield was being consumed with every enemy attack, regardless of it hitting or not. Added a check to see if the attack actually landed before running the stack removal logic. --- sim/deathknight/bone_shield.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sim/deathknight/bone_shield.go b/sim/deathknight/bone_shield.go index 03dbedc290..1e35fcdb84 100644 --- a/sim/deathknight/bone_shield.go +++ b/sim/deathknight/bone_shield.go @@ -28,12 +28,14 @@ func (dk *Deathknight) registerBoneShieldSpell() { dk.BoneShieldAura.SetStacks(sim, dk.BoneShieldAura.MaxStacks) }, OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { - if sim.CurrentTime > stackRemovalCd+2*time.Second { - stackRemovalCd = sim.CurrentTime + if result.Landed() { + if sim.CurrentTime > stackRemovalCd+2*time.Second { + stackRemovalCd = sim.CurrentTime - aura.RemoveStack(sim) - if aura.GetStacks() == 0 { - aura.Deactivate(sim) + aura.RemoveStack(sim) + if aura.GetStacks() == 0 { + aura.Deactivate(sim) + } } } },