diff options
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 258506557fe..410d05cd5a5 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -33,6 +33,7 @@ enum DeathKnightSpells DK_SPELL_GHOUL_EXPLODE = 47496, DISPLAY_GHOUL_CORPSE = 25537, DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890, + DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658, DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189, DK_SPELL_WILL_OF_THE_NECROPOLIS_AURA_R1 = 52284, }; @@ -484,6 +485,52 @@ class spell_dk_spell_deflection : public SpellScriptLoader } }; +// 48721 Blood Boil +class spell_dk_blood_boil : public SpellScriptLoader +{ + public: + spell_dk_blood_boil() : SpellScriptLoader("spell_dk_blood_boil") { } + + class spell_dk_blood_boil_SpellScript : public SpellScript + { + PrepareSpellScript(spell_dk_blood_boil_SpellScript); + + bool Validate(SpellEntry const * /*spellEntry*/) + { + if (!sSpellStore.LookupEntry(DK_SPELL_BLOOD_BOIL_TRIGGERED)) + return false; + return true; + } + + bool Load() + { + _executed = false; + return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCaster()->getClass() == CLASS_DEATH_KNIGHT; + } + + void HandleAfterHit() + { + if (_executed || !GetHitUnit()) + return; + + _executed = true; + GetCaster()->CastSpell(GetCaster(), DK_SPELL_BLOOD_BOIL_TRIGGERED, true); + } + + void Register() + { + AfterHit += SpellHitFn(spell_dk_blood_boil_SpellScript::HandleAfterHit); + } + + bool _executed; + }; + + SpellScript* GetSpellScript() const + { + return new spell_dk_blood_boil_SpellScript(); + } +}; + // 52284 - Will of the Necropolis class spell_dk_will_of_the_necropolis : public SpellScriptLoader { @@ -560,5 +607,6 @@ void AddSC_deathknight_spell_scripts() new spell_dk_runic_power_feed(); new spell_dk_scourge_strike(); new spell_dk_spell_deflection(); + new spell_dk_blood_boil(); new spell_dk_will_of_the_necropolis(); } |