Core/Spells
* Converted percent based damage dealing spell effects to scripts * Fix Leviroth Self-Impale damage Closes #6085 Signed-off-by: Shauren <[email protected]>
This commit is contained in:
-31
@@ -515,36 +515,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class spell_spinning_pain_spike : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_spinning_pain_spike() : SpellScriptLoader("spell_spinning_pain_spike") {}
|
||||
|
||||
class spell_spinning_pain_spike_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_spinning_pain_spike_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
{
|
||||
Unit* target = GetHitUnit();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->isAlive())
|
||||
SetHitDamage(target->CountPctFromMaxHealth(50));
|
||||
}
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_spinning_pain_spike_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_spinning_pain_spike_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_jaraxxus()
|
||||
{
|
||||
new boss_jaraxxus();
|
||||
@@ -553,5 +523,4 @@ void AddSC_boss_jaraxxus()
|
||||
new mob_fel_infernal();
|
||||
new mob_nether_portal();
|
||||
new mob_mistress_of_pain();
|
||||
new spell_spinning_pain_spike();
|
||||
}
|
||||
|
||||
@@ -947,13 +947,19 @@ class spell_xt002_tympanic_tantrum : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove_if (PlayerOrPetCheck());
|
||||
unitList.remove_if(PlayerOrPetCheck());
|
||||
}
|
||||
|
||||
void RecalculateDamage()
|
||||
{
|
||||
SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(GetHitDamage()));
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnUnitTargetSelect += SpellUnitTargetFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnHit += SpellHitFn(spell_xt002_tympanic_tantrum_SpellScript::RecalculateDamage);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user