Core/Auras: change from if to switch and fix calculation for inifinite replenishment.
This commit is contained in:
@@ -660,19 +660,25 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||||
if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_GENERIC)
|
switch (m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
// Replenishment (0.2% from max)
|
case 57669: // Replenishment (0.2% from max)
|
||||||
// Infinite Replenishment
|
|
||||||
if (m_spellInfo->SpellIconID == 3184 && m_spellInfo->SpellVisual[0] == 12495)
|
if (m_spellInfo->SpellIconID == 3184 && m_spellInfo->SpellVisual[0] == 12495)
|
||||||
amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
|
amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
|
||||||
}
|
break;
|
||||||
// Innervate
|
case 61782: // Infinite Replenishment
|
||||||
else if (m_spellInfo->Id == 29166)
|
if (m_spellInfo->SpellIconID == 3184 && m_spellInfo->SpellVisual[0] == 12495)
|
||||||
|
amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.0025f;
|
||||||
|
break;
|
||||||
|
case 29166: // Innervate
|
||||||
ApplyPctF(amount, float(GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA)) / GetTotalTicks());
|
ApplyPctF(amount, float(GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA)) / GetTotalTicks());
|
||||||
// Owlkin Frenzy
|
break;
|
||||||
else if (m_spellInfo->Id == 48391)
|
case 48391: // Owlkin Frenzy
|
||||||
ApplyPctU(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
|
ApplyPctU(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_PERIODIC_HEAL:
|
case SPELL_AURA_PERIODIC_HEAL:
|
||||||
if (!caster)
|
if (!caster)
|
||||||
|
|||||||
Reference in New Issue
Block a user