diff options
| author | Jildor <gildor55@gmail.com> | 2012-04-01 18:00:37 +0200 |
|---|---|---|
| committer | Jildor <gildor55@gmail.com> | 2012-04-01 18:00:37 +0200 |
| commit | b8558a699016276393954f228c26c3ddf3e49aed (patch) | |
| tree | 879a7c206e44251d1472e59f2017255e1fc6fc19 /src | |
| parent | 1bc99cd5af348c578a8cfe7e3641c1e8f59bb7a0 (diff) | |
Core/Spells: Fix Spinning Pain Spike damage
Close: #5652
Diffstat (limited to 'src')
| -rwxr-xr-x | src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index a7328b43826..a7f584b8206 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -515,6 +515,36 @@ public: }; +class spell_spinning_pain_spike : public SpellScriptLoader +{ + public: + spell_spinning_pain_spike() : SpellScriptLoader("spell_spinning_pain_spike") {} + + class spell_spinning_pain_spike_SpellScript : public SpellScript + { + PrepareSpellScript(spell_spinning_pain_spike_SpellScript); + + void HandleBeforeHit() + { + Unit* target = GetHitUnit(); + if (!target) + return; + + if (target->isAlive()) + SetHitDamage(target->GetMaxHealth()*0.5f); + } + void Register() + { + BeforeHit += SpellHitFn(spell_spinning_pain_spike_SpellScript::HandleBeforeHit); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_spinning_pain_spike_SpellScript(); + } +}; + void AddSC_boss_jaraxxus() { new boss_jaraxxus(); @@ -523,4 +553,5 @@ void AddSC_boss_jaraxxus() new mob_fel_infernal(); new mob_nether_portal(); new mob_mistress_of_pain(); + new spell_spinning_pain_spike(); } |
