Skip to content

Commit 00a365a

Browse files
committed
Add Stagger overflow exception and fix Swift Reflexes self hit
1 parent d828a54 commit 00a365a

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

sim/monk/brewmaster/TestBrewmaster.results

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,10 +3086,10 @@ dps_results: {
30863086
dps_results: {
30873087
key: "TestBrewmaster-Average-Default"
30883088
value: {
3089-
dps: 116510.47879
3090-
tps: 116510.47879
3091-
dtps: 46610.76715
3092-
hps: 12007.64212
3089+
dps: 120326.48676
3090+
tps: 120326.48676
3091+
dtps: 45251.02799
3092+
hps: 12038.29029
30933093
}
30943094
}
30953095
dps_results: {
@@ -3479,9 +3479,9 @@ dps_results: {
34793479
dps_results: {
34803480
key: "TestBrewmaster-SwitchInFrontOfTarget-Default"
34813481
value: {
3482-
dps: 118506.85627
3483-
tps: 118506.85627
3484-
dtps: 47636.38354
3485-
hps: 11687.65449
3482+
dps: 122342.63316
3483+
tps: 122342.63316
3484+
dtps: 45996.25251
3485+
hps: 11784.50849
34863486
}
34873487
}

sim/monk/brewmaster/stagger.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ func (bm *BrewmasterMonk) registerStagger() {
6161
oldDamagePerTick := dot.SnapshotBaseDamage
6262
dot.SnapshotBaseDamage = damagePerTick
6363
bm.Stagger.Cast(sim, target)
64+
newStaggerValue := int32(damagePerTick)
65+
if newStaggerValue < 0 {
66+
panic("Stagger is above 2.147 billion. Please check your Rotation/Encounter settings.")
67+
}
68+
6469
dot.Aura.SetStacks(sim, int32(damagePerTick))
6570

6671
if sim.Log != nil && dot.Aura.IsActive() {

sim/monk/passives.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (monk *Monk) registerSwiftReflexes() {
8989
OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
9090
if icd.IsReady(sim) && result.Outcome.Matches(core.OutcomeParry) {
9191
icd.Use(sim)
92-
swiftReflexesAttack.Cast(sim, result.Target)
92+
swiftReflexesAttack.Cast(sim, spell.Unit)
9393
}
9494
},
9595
}).AttachAdditivePseudoStatBuff(&monk.PseudoStats.BaseParryChance, 0.05))

0 commit comments

Comments
 (0)