diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-17 17:50:05 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2018-02-17 17:50:05 -0300 |
commit | 1ac87b6c6024b06c361d550795d041ea4b7e5a6c (patch) | |
tree | 6bb6d1a10ef1703c49f7a3bfeb921f9f33903df1 /src | |
parent | a6673f6aa7a1c2ca4b3f2ac22cbff5f4191ec664 (diff) |
Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet
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 ad1765988a6..8749e5f9313 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5486,14 +5486,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); |