Core/Spells: Fixed Improved Health Funnel damage reduction effect.
Author: Josh closes #7275
This commit is contained in:
1 parent
f9b3cf1531
commit
673ce30f38
2 files changed
+50
No files matched your search
@@ -41,6 +41,10 @@ enum WarlockSpells
|
||||
WARLOCK_HAUNT_HEAL = 48210,
|
||||
WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
|
||||
WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
|
||||
};
|
||||
|
||||
class spell_warl_banish : public SpellScriptLoader
|
||||
@@ -671,6 +675,48 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warl_health_funnel : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_warl_health_funnel() : SpellScriptLoader("spell_warl_health_funnel") { }
|
||||
|
||||
class spell_warl_health_funnel_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warl_health_funnel_AuraScript)
|
||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
{
|
||||
if (GetCaster()->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R2))
|
||||
target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2, true);
|
||||
else if (GetCaster()->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R1))
|
||||
target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
{
|
||||
target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1);
|
||||
target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_warl_health_funnel_AuraScript::RemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectApply += AuraEffectApplyFn(spell_warl_health_funnel_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_warl_health_funnel_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warlock_spell_scripts()
|
||||
{
|
||||
new spell_warl_banish();
|
||||
@@ -686,4 +732,5 @@ void AddSC_warlock_spell_scripts()
|
||||
new spell_warl_haunt();
|
||||
new spell_warl_unstable_affliction();
|
||||
new spell_warl_curse_of_doom();
|
||||
new spell_warl_health_funnel();
|
||||
}
|
||||
Reference in new issue
Block a user