diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-30 23:57:04 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-30 23:59:30 +0200 |
| commit | bab04cc5f806c2dd42df561f5da4013ab95a51de (patch) | |
| tree | 0af998b0aee1faa8680a22fd279aabc282b11d2a /src/server/scripts/Northrend | |
| parent | a7d876e8b570f023db3bf8903f04d251445b8dc1 (diff) | |
Core/Spells: Fix try for logic fail in 4ba3c2e51df0485449a4bd01f162faa719334be9
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index e5f8cce6c46..e6969d1f519 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -520,6 +520,63 @@ public: } }; + +class spell_oculus_touch_the_nightmare : public SpellScriptLoader +{ + public: + spell_oculus_touch_the_nightmare() : SpellScriptLoader("spell_oculus_touch_the_nightmare") { } + + class spell_oculus_touch_the_nightmare_SpellScript : public SpellScript + { + PrepareSpellScript(spell_oculus_touch_the_nightmare_SpellScript); + + void HandleDamageCalc(SpellEffIndex /*effIndex*/) + { + SetHitDamage(int32(GetCaster()->CountPctFromMaxHealth(30))); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_oculus_touch_the_nightmare_SpellScript::HandleDamageCalc, EFFECT_2, SPELL_EFFECT_SCHOOL_DAMAGE); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_oculus_touch_the_nightmare_SpellScript(); + } +}; + +class spell_oculus_dream_funnel: public SpellScriptLoader +{ + public: + spell_oculus_dream_funnel() : SpellScriptLoader("spell_oculus_dream_funnel") { } + + class spell_oculus_dream_funnel_AuraScript : public AuraScript + { + PrepareAuraScript(spell_oculus_dream_funnel_AuraScript); + + void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) + { + if (Unit* caster = GetCaster()) + amount = int32(caster->CountPctFromMaxHealth(5)); + + canBeRecalculated = false; + } + + void Register() + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_oculus_dream_funnel_AuraScript(); + } +}; + void AddSC_oculus() { new npc_verdisa_beglaristrasz_eternos(); @@ -527,4 +584,6 @@ void AddSC_oculus() new npc_ruby_emerald_amber_drake(); new spell_gen_stop_time(); new spell_call_ruby_emerald_amber_drake(); + new spell_oculus_touch_the_nightmare(); + new spell_oculus_dream_funnel(); } |
