mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet
This commit is contained in:
@@ -5969,14 +5969,13 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
||||
target->AddThreat(caster, float(gainedAmount) * 0.5f, GetSpellInfo()->GetSchoolMask(), GetSpellInfo());
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user