mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Scripts/ToCH: Spellscript for Eadric's Radiance
Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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');
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user