Skip to content

Commit

Permalink
Merge pull request #3083 from wowsims/fix_dk_mcds
Browse files Browse the repository at this point in the history
DK Update MCDs after synced use
  • Loading branch information
rosenrusinov authored May 13, 2023
2 parents aaf0fcb + 8a1f44c commit 40594e1
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 23 deletions.
26 changes: 13 additions & 13 deletions sim/deathknight/dps/TestBlood.results
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ dps_results: {
dps_results: {
key: "TestBlood-AllItems-BaubleofTrueBlood-50354"
value: {
dps: 6879.24838
tps: 3485.56722
hps: 61.26936
dps: 6879.24966
tps: 3485.56799
hps: 91.47459
}
}
dps_results: {
key: "TestBlood-AllItems-BaubleofTrueBlood-50726"
value: {
dps: 6879.24838
tps: 3485.56722
hps: 61.26936
dps: 6879.24966
tps: 3485.56799
hps: 91.47459
}
}
dps_results: {
Expand Down Expand Up @@ -169,7 +169,7 @@ dps_results: {
value: {
dps: 6879.24571
tps: 3485.56562
hps: 42.66667
hps: 64
}
}
dps_results: {
Expand Down Expand Up @@ -406,8 +406,8 @@ dps_results: {
dps_results: {
key: "TestBlood-AllItems-GnomishLightningGenerator-41121"
value: {
dps: 6984.44375
tps: 3545.305
dps: 6998.33335
tps: 3553.01431
}
}
dps_results: {
Expand Down Expand Up @@ -441,8 +441,8 @@ dps_results: {
dps_results: {
key: "TestBlood-AllItems-IncisorFragment-37723"
value: {
dps: 7046.54571
tps: 3578.51945
dps: 7070.97551
tps: 3593.17733
}
}
dps_results: {
Expand Down Expand Up @@ -624,8 +624,8 @@ dps_results: {
dps_results: {
key: "TestBlood-AllItems-SealofthePantheon-36993"
value: {
dps: 6890.60959
tps: 3491.07819
dps: 6894.58792
tps: 3493.39924
}
}
dps_results: {
Expand Down
16 changes: 8 additions & 8 deletions sim/deathknight/dps/TestUnholy.results
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-BaubleofTrueBlood-50354"
value: {
dps: 7526.33743
tps: 4842.29764
hps: 355.33475
dps: 7526.33795
tps: 4842.29806
hps: 355.32486
}
}
dps_results: {
key: "TestUnholy-AllItems-BaubleofTrueBlood-50726"
value: {
dps: 7526.33743
tps: 4842.29764
hps: 355.33475
dps: 7526.33795
tps: 4842.29806
hps: 355.32486
}
}
dps_results: {
Expand Down Expand Up @@ -486,8 +486,8 @@ dps_results: {
dps_results: {
key: "TestUnholy-AllItems-IncisorFragment-37723"
value: {
dps: 7693.2175
tps: 4979.70576
dps: 7693.27173
tps: 4979.74915
hps: 266.55313
}
}
Expand Down
3 changes: 2 additions & 1 deletion sim/deathknight/dps/dps_deathknight.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,11 @@ func (dk *DpsDeathknight) drwCooldownSync(actionID core.ActionID, isPotion bool)
if dk.br.activatingDrw {
return true
}

if dk.DancingRuneWeapon.CD.TimeToReady(sim) > majorCd.Spell.CD.Duration && !isPotion {
return true
}
if dk.DancingRuneWeapon.CD.ReadyAt() > sim.Duration {
if !dk.DancingRuneWeapon.IsReady(sim) && dk.DancingRuneWeapon.CD.ReadyAt() > sim.Duration {
return true
}

Expand Down
5 changes: 4 additions & 1 deletion sim/deathknight/dps/rotation_blood.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (dk *DpsDeathknight) RotationActionBL_BloodRotation(sim *core.Simulation, t
// Use CDs
dk.br.activatingDrw = true
dk.br.drwSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
dk.br.activatingDrw = false
}
dk.RaiseDead.Cast(sim, target)
Expand Down Expand Up @@ -186,6 +187,7 @@ func (dk *DpsDeathknight) RotationActionBL_ResetToBloodMain(sim *core.Simulation
func (dk *DpsDeathknight) RotationActionBL_DRW_Snapshot(sim *core.Simulation, target *core.Unit, s *deathknight.Sequence) time.Duration {
dk.br.activatingDrw = true
dk.br.drwSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
dk.br.activatingDrw = false
s.Advance()
return sim.CurrentTime
Expand All @@ -209,8 +211,9 @@ func (dk *DpsDeathknight) RotationActionBL_BS(sim *core.Simulation, target *core
ffRemaining := dk.FrostFeverSpell.Dot(target).RemainingDuration(sim)
bpRemaining := dk.BloodPlagueSpell.Dot(target).RemainingDuration(sim)
casted := false

// FF is not active or will drop before Gcd is ready after this cast
if !dk.FrostFeverSpell.Dot(target).IsActive() || ffRemaining <= core.GCDDefault || !dk.BloodPlagueSpell.Dot(target).IsActive() || bpRemaining <= core.GCDDefault {
if dk.sr.hasGod && (!dk.FrostFeverSpell.Dot(target).IsActive() || ffRemaining <= core.GCDDefault || !dk.BloodPlagueSpell.Dot(target).IsActive() || bpRemaining <= core.GCDDefault) {
casted = dk.Pestilence.Cast(sim, target)
} else {
casted = dk.br.bloodSpell.Cast(sim, target)
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/dps/rotation_blood_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ func (dk *DpsDeathknight) blDrwCheck(sim *core.Simulation, target *core.Unit, ca

dk.br.activatingDrw = true
dk.br.drwSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
dk.br.activatingDrw = false

if dk.DancingRuneWeapon.Cast(sim, target) {
Expand Down
1 change: 1 addition & 0 deletions sim/deathknight/dps/rotation_unholy.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ func (dk *DpsDeathknight) uhAfterGargoyleSequence(sim *core.Simulation) {

func (dk *DpsDeathknight) RotationActionCallback_Haste_Snapshot(sim *core.Simulation, target *core.Unit, s *deathknight.Sequence) time.Duration {
dk.ur.gargoyleSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
s.Advance()
return sim.CurrentTime
}
Expand Down
2 changes: 2 additions & 0 deletions sim/deathknight/dps/rotation_unholy_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@ func (dk *DpsDeathknight) uhGargoyleCheck(sim *core.Simulation, target *core.Uni
dk.ur.activatingGargoyle = true
dk.OnGargoyleStartFirstCast = func() {
dk.ur.gargoyleSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
}
dk.ur.gargoyleSnapshot.ActivateMajorCooldowns(sim)
dk.UpdateMajorCooldowns()
dk.ur.activatingGargoyle = false

if dk.SummonGargoyle.Cast(sim, target) {
Expand Down

0 comments on commit 40594e1

Please sign in to comment.