diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-01 17:22:42 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-01 17:22:42 +0200 |
| commit | b8b21ce1f8930a458faf2fb131747807b5aa6a24 (patch) | |
| tree | 591bbbf5b6b527bd9675fca3368ea7bf66edf28a /src/server/scripts | |
| parent | a71341bbcf60b1f1bd7d4d23f479960ba1f548c0 (diff) | |
| parent | f04217300c13586faef25fbf1804272f28313eae (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/scripts')
3 files changed, 63 insertions, 36 deletions
diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index ed7647be89c..99a4ce77623 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -96,13 +96,13 @@ class instance_drak_tharon_keep : public InstanceMapScript float z = creature->GetPositionZ(); if (x < -374.0f && x > -379.0f && y > -820.0f && y < -815.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[0] = creature->GetGUID(); + NovosSummonerGUIDs[0] = creature->GetGUID(); else if (x < -379.0f && x > -385.0f && y > -820.0f && y < -815.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[1] = creature->GetGUID(); + NovosSummonerGUIDs[1] = creature->GetGUID(); else if (x < -374.0f && x > -385.0f && y > -827.0f && y < -820.0f && z < 60.0f && z > 58.0f) - NovosCrystalGUIDs[2] = creature->GetGUID(); + NovosSummonerGUIDs[2] = creature->GetGUID(); else if (x < -338.0f && x > -344.0f && y > -727.0f && y < 721.0f && z < 30.0f && z > 26.0f) - NovosCrystalGUIDs[3] = creature->GetGUID(); + NovosSummonerGUIDs[3] = creature->GetGUID(); } uint64 GetData64(uint32 type) const OVERRIDE 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(); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 91540bed7b0..da36646c243 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1313,36 +1313,6 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader } }; -class spell_gen_dream_funnel: public SpellScriptLoader -{ - public: - spell_gen_dream_funnel() : SpellScriptLoader("spell_gen_dream_funnel") { } - - class spell_gen_dream_funnel_AuraScript : public AuraScript - { - PrepareAuraScript(spell_gen_dream_funnel_AuraScript); - - void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) - { - if (GetCaster()) - amount = GetCaster()->GetMaxHealth() * 0.05f; - - canBeRecalculated = false; - } - - void Register() OVERRIDE - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE); - } - }; - - AuraScript* GetAuraScript() const OVERRIDE - { - return new spell_gen_dream_funnel_AuraScript(); - } -}; - class spell_gen_ds_flush_knockback : public SpellScriptLoader { public: @@ -3667,7 +3637,6 @@ void AddSC_generic_spell_scripts() new spell_gen_clone_weapon(); new spell_gen_clone_weapon_aura(); new spell_gen_count_pct_from_max_hp("spell_gen_default_count_pct_from_max_hp"); - new spell_gen_count_pct_from_max_hp("spell_gen_30pct_count_pct_from_max_hp", 30); new spell_gen_count_pct_from_max_hp("spell_gen_50pct_count_pct_from_max_hp", 50); new spell_gen_create_lance(); new spell_gen_creature_permanent_feign_death(); @@ -3676,7 +3645,6 @@ void AddSC_generic_spell_scripts() new spell_gen_defend(); new spell_gen_despawn_self(); new spell_gen_divine_storm_cd_reset(); - new spell_gen_dream_funnel(); new spell_gen_ds_flush_knockback(); new spell_gen_dummy_trigger(); new spell_gen_dungeon_credit(); |
