Core/Spells: revert some of previous commit and fix up a few things.

This commit is contained in:
Kandera committed 2012-06-15 14:07:10 -04:00
1 parent 38ac9b38fc
commit 2ff2387aa5
2 files changed
+37 -6

No files matched your search

+5 -4
View File
@@ -535,15 +535,16 @@ class spell_warl_haunt : public SpellScriptLoader
{
PrepareSpellScript(spell_warl_haunt_SpellScript);
void HandleEffectHit(SpellEffIndex /*effIndex*/)
void HandleEffectHit()
{
if (AuraEffect* aurEff = GetExplTargetUnit()->GetAuraEffectOfRankedSpell(WARLOCK_HAUNT,EFFECT_1))
aurEff->SetAmount(CalculatePctN(aurEff->GetAmount(), GetHitDamage()));
if (Aura* aura = GetHitAura())
if (AuraEffect* aurEff = aura->GetEffect(EFFECT_1))
aurEff->SetAmount(CalculatePctN(aurEff->GetAmount(), GetHitDamage()));
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_warl_haunt_SpellScript::HandleEffectHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnHit += SpellHitFn(spell_warl_haunt_SpellScript::HandleOnHit);
}
};