diff options
3 files changed, 46 insertions, 0 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 408474bd0f7..3b394f04d8b 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -2112,6 +2112,9 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES ( 67630, 'spell_gen_leeching_swarm'), ( 68646, 'spell_gen_leeching_swarm'), ( 68647, 'spell_gen_leeching_swarm'), +-- Trial of the Champion +( 66862, 'spell_eadric_radiance'), +( 67681, 'spell_eadric_radiance'), -- Ulduar ( 63308, 'spell_razorscale_devouring_flame'), ( 62717, 'spell_ignis_slag_pot'), diff --git a/sql/updates/world/2011_04_22_01_world_spell_script_names.sql b/sql/updates/world/2011_04_22_01_world_spell_script_names.sql new file mode 100644 index 00000000000..c4d76096ca9 --- /dev/null +++ b/sql/updates/world/2011_04_22_01_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (66862,67681); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(66862,'spell_eadric_radiance'), +(67681,'spell_eadric_radiance');
\ No newline at end of file diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index cc3562d463a..72fe60846b8 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -56,6 +56,44 @@ enum eSpells SPELL_WAKING_NIGHTMARE_H = 67677 }; +class OrientationCheck : public std::unary_function<Unit*, bool> +{ + public: + explicit OrientationCheck(Unit* _caster) : caster(_caster) { } + bool operator() (Unit* unit) + { + return !unit->isInFront(caster, 40.0f, 2.5f); + } + + private: + Unit* caster; +}; + +class spell_eadric_radiance : public SpellScriptLoader +{ + public: + spell_eadric_radiance() : SpellScriptLoader("spell_eadric_radiance") { } + class spell_eadric_radiance_SpellScript : public SpellScript + { + PrepareSpellScript(spell_eadric_radiance_SpellScript); + void FilterTargets(std::list<Unit*>& unitList) + { + unitList.remove_if(OrientationCheck(GetCaster())); + } + + void Register() + { + OnUnitTargetSelect += SpellUnitTargetFn(spell_eadric_radiance_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_AREA_ENEMY_SRC); + OnUnitTargetSelect += SpellUnitTargetFn(spell_eadric_radiance_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_AREA_ENEMY_SRC); + } + }; + + SpellScript *GetSpellScript() const + { + return new spell_eadric_radiance_SpellScript(); + } +}; + class boss_eadric : public CreatureScript { public: @@ -512,6 +550,7 @@ public: void AddSC_boss_argent_challenge() { new boss_eadric(); + new spell_eadric_radiance(); new boss_paletress(); new npc_memory(); new npc_argent_soldier(); |