Core/Spells: move more spells to spellscripts
This commit is contained in:
1 parent
5c36a50ed4
commit
fbddda52e7
7 files changed
+250
-112
No files matched your search
@@ -79,6 +79,18 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.size() < 2)
|
||||
return;
|
||||
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
|
||||
WorldObject* target = targets.front();
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
int32 damage = GetEffectValue();
|
||||
@@ -88,6 +100,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_ancestral_awakening_proc_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_sha_ancestral_awakening_proc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user