From 5c20419f658e4d63bdb07fc17fac2c8c8153a15f Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Thu, 31 Mar 2022 18:53:35 +0200 Subject: [PATCH] Core/Spells: Bloodthirst will no longer proc its first healing effect from Bloodthirst itself --- src/server/scripts/Spells/spell_warrior.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 6f7405edf6..da8c346b21 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -98,16 +98,15 @@ class spell_warr_bloodthirst : public SpellScript SetEffectValue(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK) * GetEffectValue(), 1)); } - void HandleDummy(SpellEffIndex /*effIndex*/) + void HandleBloodthirstHealEffect() { - int32 damage = GetEffectValue(); - GetCaster()->CastSpell(GetCaster(), SPELL_WARRIOR_BLOODTHIRST, { SPELLVALUE_BASE_POINT0, damage }); + GetCaster()->CastSpell(nullptr, SPELL_WARRIOR_BLOODTHIRST, true); } void Register() override { OnEffectLaunchTarget.Register(&spell_warr_bloodthirst::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); - OnEffectHit.Register(&spell_warr_bloodthirst::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY); + AfterHit.Register(&spell_warr_bloodthirst::HandleBloodthirstHealEffect); } };