mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Spells: Fixed Riptide bonus on Chain Heal
closes #1152 Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
@@ -542,6 +542,51 @@ class spell_sha_lava_lash : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 1064 Chain Heal
|
||||
class spell_sha_chain_heal : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sha_chain_heal() : SpellScriptLoader("spell_sha_chain_heal") { }
|
||||
|
||||
class spell_sha_chain_heal_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sha_chain_heal_SpellScript);
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (firstHeal)
|
||||
{
|
||||
// Check if the target has Riptide
|
||||
if (AuraEffect* aurEff = GetHitUnit()->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_SHAMAN, 0, 0, 0x10, GetCaster()->GetGUID()))
|
||||
{
|
||||
riptide = true;
|
||||
// Consume it
|
||||
GetHitUnit()->RemoveAura(aurEff->GetBase());
|
||||
}
|
||||
firstHeal = false;
|
||||
}
|
||||
// Riptide increases the Chain Heal effect by 25%
|
||||
if (riptide)
|
||||
SetHitHeal(GetHitHeal() * 1.25f);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_sha_chain_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
firstHeal = true;
|
||||
riptide = false;
|
||||
}
|
||||
|
||||
bool firstHeal;
|
||||
bool riptide;
|
||||
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_sha_chain_heal_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_shaman_spell_scripts()
|
||||
{
|
||||
@@ -556,4 +601,5 @@ void AddSC_shaman_spell_scripts()
|
||||
new spell_sha_healing_stream_totem();
|
||||
new spell_sha_mana_spring_totem();
|
||||
new spell_sha_lava_lash();
|
||||
new spell_sha_chain_heal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user