From 26a2eced6e50738ef776c7eb6260b6313cc9e713 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 8 Aug 2021 23:33:31 -0400 Subject: [PATCH] Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet Port From (https://github.com/TrinityCore/TrinityCore/commit/64399f58a37e0c2633d986af6af781e7f7b15998) --- Source/Game/Spells/Auras/AuraEffect.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 4a4f49b31..7cabc5e6d 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5256,13 +5256,13 @@ namespace Game.Spells } // Drain Mana - if (m_spellInfo.SpellFamilyName == SpellFamilyNames.Warlock && m_spellInfo.SpellFamilyFlags[0].HasAnyFlag(0x00000010)) + if (caster.GetGuardianPet() != null && m_spellInfo.SpellFamilyName == SpellFamilyNames.Warlock && m_spellInfo.SpellFamilyFlags[0].HasAnyFlag(0x00000010)) { int manaFeedVal = 0; AuraEffect aurEff = GetBase().GetEffect(1); if (aurEff != null) manaFeedVal = aurEff.GetAmount(); - // Mana Feed - Drain Mana + if (manaFeedVal > 0) { int feedAmount = MathFunctions.CalculatePct(gainedAmount, manaFeedVal);