Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet
This commit is contained in:
1 parent
3adfc66859
commit
e219b3f940
1 file changed
+4
-5
@@ -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