-
Notifications
You must be signed in to change notification settings - Fork 132
/
raise_dead.go
57 lines (49 loc) · 1.49 KB
/
raise_dead.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package deathknight
import (
"time"
"github.com/wowsims/wotlk/sim/core"
)
func (dk *Deathknight) registerRaiseDeadCD() {
// If talented as permanent pet skip this spell
if dk.Talents.MasterOfGhouls {
return
}
raiseDeadAura := dk.RegisterAura(core.Aura{
Label: "Raise Dead",
ActionID: core.ActionID{SpellID: 46584},
Duration: time.Minute * 1,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
dk.Ghoul.Pet.Enable(sim, dk.Ghoul)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
dk.Ghoul.Pet.Disable(sim)
},
})
dk.RaiseDead = dk.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 46584},
Flags: core.SpellFlagAPL,
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
CD: core.Cooldown{
Timer: dk.NewTimer(),
Duration: time.Minute*3 - time.Second*45*time.Duration(dk.Talents.NightOfTheDead),
},
},
ApplyEffects: func(sim *core.Simulation, unit *core.Unit, spell *core.Spell) {
raiseDeadAura.Activate(sim)
},
})
// TODO: Raise Dead should be used from the rotation in a smart way
// adding it as a survival MCD with GCDs messes with rotation more then it helps
// if !dk.Inputs.IsDps {
// dk.AddMajorCooldown(core.MajorCooldown{
// Spell: dk.RaiseDead,
// Type: core.CooldownTypeSurvival,
// ShouldActivate: func(sim *core.Simulation, character *core.Character) bool {
// return dk.CurrentHealthPercent() < 0.5 && sim.GetRemainingDuration() > 5*time.Second
// },
// })
// }
}