aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp9
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);