From 0d0baf004d58f5752f3ec3e0341d6e2cbbc8bd04 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Tue, 30 Jul 2013 15:46:56 +0200 Subject: Scripts/DrakTharonKeep: fix copy paste fail Closes #10402 --- .../Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') 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 -- cgit v1.2.3 From bab04cc5f806c2dd42df561f5da4013ab95a51de Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Tue, 30 Jul 2013 23:57:04 +0200 Subject: Core/Spells: Fix try for logic fail in 4ba3c2e51df0485449a4bd01f162faa719334be9 --- .../2013_07_31_00_world_spell_script_names.sql | 4 ++ .../scripts/Northrend/Nexus/Oculus/oculus.cpp | 59 ++++++++++++++++++++++ src/server/scripts/Spells/spell_generic.cpp | 32 ------------ 3 files changed, 63 insertions(+), 32 deletions(-) create mode 100644 sql/updates/world/2013_07_31_00_world_spell_script_names.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2013_07_31_00_world_spell_script_names.sql b/sql/updates/world/2013_07_31_00_world_spell_script_names.sql new file mode 100644 index 00000000000..27779d0da45 --- /dev/null +++ b/sql/updates/world/2013_07_31_00_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (50341,50344); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(50341, 'spell_oculus_touch_the_nightmare'), +(50344, 'spell_oculus_dream_funnel'); 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 13a19ca5b23..2e6594714c9 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1296,36 +1296,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: @@ -3679,7 +3649,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(); @@ -3689,7 +3658,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(); -- cgit v1.2.3