diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-17 17:50:05 -0300 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2021-08-08 21:21:34 +0200 |
commit | 64399f58a37e0c2633d986af6af781e7f7b15998 (patch) | |
tree | 138c7d788aeae2e135c8d96b67c99c1ed8958310 /src | |
parent | 9252fe89fece876dae6a4c18cd2559074b7764c8 (diff) |
Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet
(cherry picked from commit 1ac87b6c6024b06c361d550795d041ea4b7e5a6c)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index d82501dba26..9d3cb0433a9 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5533,14 +5533,13 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con target->GetThreatManager().AddThreat(caster, float(gainedAmount) * 0.5f, GetSpellInfo(), true); } - // Drain Mana - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK - && m_spellInfo->SpellFamilyFlags[0] & 0x00000010) + // Drain Mana - Mana Feed effect + if (caster->GetGuardianPet() && m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags[0] & 0x00000010) { int32 manaFeedVal = 0; - if (AuraEffect const* aurEff = GetBase()->GetEffect(1)) + if (AuraEffect const* aurEff = GetBase()->GetEffect(EFFECT_1)) manaFeedVal = aurEff->GetAmount(); - // Mana Feed - Drain Mana + if (manaFeedVal > 0) { int32 feedAmount = CalculatePct(gainedAmount, manaFeedVal); |