mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
change GetMaxHealth and BeforeHit...
This commit is contained in:
@@ -524,18 +524,18 @@ class spell_spinning_pain_spike : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_spinning_pain_spike_SpellScript);
|
||||
|
||||
void HandleBeforeHit()
|
||||
void HandleScript(SpellEffIndex /*eff*/)
|
||||
{
|
||||
Unit* target = GetHitUnit();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->isAlive())
|
||||
SetHitDamage(target->GetMaxHealth()*0.5f);
|
||||
SetHitDamage(target->CountPctFromMaxHealth(50));
|
||||
}
|
||||
void Register()
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_spinning_pain_spike_SpellScript::HandleBeforeHit);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_spinning_pain_spike_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user