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)
This commit is contained in:
@@ -5256,13 +5256,13 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Drain Mana
|
// Drain Mana
|
||||||
if (m_spellInfo.SpellFamilyName == SpellFamilyNames.Warlock && m_spellInfo.SpellFamilyFlags[0].HasAnyFlag<uint>(0x00000010))
|
if (caster.GetGuardianPet() != null && m_spellInfo.SpellFamilyName == SpellFamilyNames.Warlock && m_spellInfo.SpellFamilyFlags[0].HasAnyFlag<uint>(0x00000010))
|
||||||
{
|
{
|
||||||
int manaFeedVal = 0;
|
int manaFeedVal = 0;
|
||||||
AuraEffect aurEff = GetBase().GetEffect(1);
|
AuraEffect aurEff = GetBase().GetEffect(1);
|
||||||
if (aurEff != null)
|
if (aurEff != null)
|
||||||
manaFeedVal = aurEff.GetAmount();
|
manaFeedVal = aurEff.GetAmount();
|
||||||
// Mana Feed - Drain Mana
|
|
||||||
if (manaFeedVal > 0)
|
if (manaFeedVal > 0)
|
||||||
{
|
{
|
||||||
int feedAmount = MathFunctions.CalculatePct(gainedAmount, manaFeedVal);
|
int feedAmount = MathFunctions.CalculatePct(gainedAmount, manaFeedVal);
|
||||||
|
|||||||
Reference in New Issue
Block a user