Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnCastComplete rework #2247

Merged
merged 6 commits into from
Jan 2, 2023
Merged

OnCastComplete rework #2247

merged 6 commits into from
Jan 2, 2023

Conversation

Tharre
Copy link
Contributor

@Tharre Tharre commented Dec 30, 2022

No description provided.

@Tharre Tharre changed the title Oncastcomplete rework OnCastComplete rework Dec 30, 2022
@Tharre Tharre force-pushed the oncastcomplete_rework branch 4 times, most recently from 8e48bef to ecf64ba Compare December 30, 2022 09:29
dps: 7355.53047
tps: 7194.44067
dps: 7320.79478
tps: 7159.70498
}
}
dps_results: {
key: "TestBalance-Average-Default"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like balance is losing 34 DPS in the average test. Is this expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the Remaining Differences commit, balance damage doesn't change at all there, so it should be fully explained by the caster trinket change.

@@ -314,14 +314,15 @@ func (druid *Druid) applyOmenOfClarity() {
spell.CostMultiplier += 1
}
},
OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of deleting this, I think we could have a local variable var proccedAt time.Duration which is set on proc, and then only remove the aura if proccedAt != sim.CurrentTime.

Then you'll be able to remove the hard-coded handling of clearcasting from all the spells.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that would work. The issue here why we have to change anything at all is that we have a CC proc -> we cast something for free -> OnSpellHitDealt is called and may proc another CC -> OnCastComplete is called and removes the CC proc. Weirdly even when moving the check into ApplyEffects the DPS is still different, I have no clue yet why that is.

Thinking about it, maybe we can check in OnCastComplete if the aura was applied at the exact same time as sim.CurrentTime and only remove it if they differ.

@@ -9,6 +9,8 @@ import (

func (paladin *Paladin) registerShieldOfRighteousnessSpell() {
baseCost := paladin.BaseMana * 0.06
has4pT8 := paladin.HasSetBonus(ItemSetAegisPlate, 4)
procAura := paladin.NewTemporaryStatsAura("Aegis", core.ActionID{SpellID: 64883}, stats.Stats{stats.BlockValue: 225}, time.Second*6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we refactor this slightly like so?

var aegisPlateProcAura *core.Aura
if paladin.HasSetBonus(ItemSetAegisPlate, 4) {
  aegisPlateProcAura = paladin.NewTemporaryStatsAura("Aegis", core.ActionID{SpellID: 64883}, stats.Stats{stats.BlockValue: 225}, time.Second*6)
}

...
...

if aegisPlateProcAura != nil {
  aegisPlateProcAura.Activate(sim)
}

The advantage is that the aura won't be registered unless the set bonus is equipped, so in most cases we'll have 1 less aura attached to the unit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes more sense.

@@ -89,22 +89,22 @@ var ItemSetSanctificationRegalia = core.NewItemSet(core.ItemSet{
2: func(agent core.Agent) {
},
4: func(agent core.Agent) {
priest := agent.(PriestAgent).GetPriest()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can revert this change entirely. It seems likely that activating after the PWS cast is correct behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@@ -46,6 +47,14 @@ func (warlock *Warlock) registerLifeTapSpell() {
if hasGlyph {
warlock.GlyphOfLifeTapAura.Activate(sim)
}

if has4PT7 {
if warlock.SpiritsoftheDamnedAura.IsActive() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aura.Activate() already checks for IsActive() and does the refresh. You can simplify this code here, which will also cause the PPM metrics for the aura to be correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice.

sim/warlock/items.go Show resolved Hide resolved
@Tharre Tharre merged commit 5d7f17d into wowsims:master Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants