Skip to content

Commit 89ae3fe

Browse files
committed
SR to proctrigger aura
1 parent 00a365a commit 89ae3fe

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

sim/monk/passives.go

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,14 @@ func (monk *Monk) registerSwiftReflexes() {
7878
},
7979
})
8080

81-
icd := &core.Cooldown{
82-
Duration: time.Second,
83-
Timer: monk.NewTimer(),
84-
}
85-
86-
core.MakePermanent(monk.RegisterAura(core.Aura{
87-
Label: "Swift Reflexes" + monk.Label,
81+
core.MakeProcTriggerAura(&monk.Unit, core.ProcTrigger{
82+
Name: "Swift Reflexes" + monk.Label,
8883
ActionID: core.ActionID{SpellID: 124334},
89-
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
90-
if icd.IsReady(sim) && result.Outcome.Matches(core.OutcomeParry) {
91-
icd.Use(sim)
92-
swiftReflexesAttack.Cast(sim, spell.Unit)
93-
}
84+
Outcome: core.OutcomeParry,
85+
Callback: core.CallbackOnSpellHitTaken,
86+
ICD: time.Second,
87+
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
88+
swiftReflexesAttack.Cast(sim, spell.Unit)
9489
},
95-
}).AttachAdditivePseudoStatBuff(&monk.PseudoStats.BaseParryChance, 0.05))
90+
}).AttachAdditivePseudoStatBuff(&monk.PseudoStats.BaseParryChance, 0.05)
9691
}

0 commit comments

Comments
 (0)