Skip to content

Commit

Permalink
Merge pull request #62 from wowsims/sham_fixes
Browse files Browse the repository at this point in the history
Fix Fire Nova Totem CD and cancelling
  • Loading branch information
Foknetics authored Feb 5, 2024
2 parents 5976dc0 + 6710dd4 commit 3875526
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sim/shaman/fire_totems.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func (shaman *Shaman) newSearingTotemSpellConfig(rank int) core.SpellConfig {
if shaman.ActiveTotems[FireTotem] != nil && shaman.ActiveTotems[FireTotem].SpellCode == int32(SpellCode_MagmaTotem) {
shaman.ActiveTotems[FireTotem].AOEDot().Cancel(sim)
}
if shaman.ActiveTotems[FireTotem] != nil && shaman.ActiveTotems[FireTotem].SpellCode == int32(SpellCode_FireNovaTotem) {
shaman.ActiveTotems[FireTotem].AOEDot().Cancel(sim)
}
spell.Dot(sim.GetTargetUnit(0)).Apply(sim)
// +1 needed because of rounding issues with totem tick time.
shaman.TotemExpirations[FireTotem] = sim.CurrentTime + duration + 1
Expand Down Expand Up @@ -168,6 +171,9 @@ func (shaman *Shaman) newMagmaTotemSpellConfig(rank int) core.SpellConfig {
if shaman.ActiveTotems[FireTotem] != nil && shaman.ActiveTotems[FireTotem].SpellCode == int32(SpellCode_SearingTotem) {
shaman.ActiveTotems[FireTotem].Dot(shaman.CurrentTarget).Cancel(sim)
}
if shaman.ActiveTotems[FireTotem] != nil && shaman.ActiveTotems[FireTotem].SpellCode == int32(SpellCode_FireNovaTotem) {
shaman.ActiveTotems[FireTotem].AOEDot().Cancel(sim)
}
spell.AOEDot().Apply(sim)
// +1 needed because of rounding issues with totem tick time.
shaman.TotemExpirations[FireTotem] = sim.CurrentTime + duration + 1
Expand Down Expand Up @@ -203,6 +209,7 @@ func (shaman *Shaman) newFireNovaTotemSpellConfig(rank int) core.SpellConfig {
baseDamageLow := FireNovaTotemBaseDamage[rank][0]
baseDamageHigh := FireNovaTotemBaseDamage[rank][1]
spellCoeff := FireNovaTotemSpellCoeff[rank]
cooldown := time.Second * 15
manaCost := FireNovaTotemManaCost[rank]
level := FireNovaTotemLevel[rank]

Expand All @@ -212,6 +219,7 @@ func (shaman *Shaman) newFireNovaTotemSpellConfig(rank int) core.SpellConfig {
spell := core.SpellConfig{
ActionID: core.ActionID{SpellID: spellId},
SpellSchool: core.SpellSchoolFire,
SpellCode: int32(SpellCode_FireNovaTotem),
ProcMask: core.ProcMaskEmpty,
Flags: SpellFlagTotem | core.SpellFlagAPL,

Expand All @@ -227,6 +235,10 @@ func (shaman *Shaman) newFireNovaTotemSpellConfig(rank int) core.SpellConfig {
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
CD: core.Cooldown{
Timer: shaman.NewTimer(),
Duration: cooldown,
},
},

DamageMultiplier: 1 + float64(shaman.Talents.CallOfFlame)*0.05,
Expand Down
1 change: 1 addition & 0 deletions sim/shaman/shaman.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const (
SpellCode_ShamanChainLightning
SpellCode_SearingTotem
SpellCode_MagmaTotem
SpellCode_FireNovaTotem
)

// Shaman represents a shaman character.
Expand Down

0 comments on commit 3875526

Please sign in to comment.