Core/Spells: move more spells to spellscripts

This commit is contained in:
joschiwald committed 2014-01-26 02:24:57 +01:00
1 parent 5c36a50ed4
commit fbddda52e7
7 files changed
+250 -112

No files matched your search

@@ -564,6 +564,39 @@ class spell_pal_eye_for_an_eye : public SpellScriptLoader
}
};
// 54968 - Glyph of Holy Light
class spell_pal_glyph_of_holy_light : public SpellScriptLoader
{
public:
spell_pal_glyph_of_holy_light() : SpellScriptLoader("spell_pal_glyph_of_holy_light") { }
class spell_pal_glyph_of_holy_light_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pal_glyph_of_holy_light_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
uint32 const maxTargets = GetSpellInfo()->MaxAffectedTargets;
if (targets.size() > maxTargets)
{
targets.sort(Trinity::HealthPctOrderPred());
targets.resize(maxTargets);
}
}
void Register() OVERRIDE
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pal_glyph_of_holy_light_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY);
}
};
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pal_glyph_of_holy_light_SpellScript();
}
};
// 63521 - Guarded by The Light
class spell_pal_guarded_by_the_light : public SpellScriptLoader
{
@@ -1142,6 +1175,7 @@ void AddSC_paladin_spell_scripts()
new spell_pal_divine_storm_dummy();
new spell_pal_exorcism_and_holy_wrath_damage();
new spell_pal_eye_for_an_eye();
new spell_pal_glyph_of_holy_light();
new spell_pal_guarded_by_the_light();
new spell_pal_hand_of_sacrifice();
new spell_pal_hand_of_salvation();