mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
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;
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_GENERIC)
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
// Replenishment (0.2% from max)
|
||||
// Infinite Replenishment
|
||||
case 57669: // Replenishment (0.2% from max)
|
||||
if (m_spellInfo->SpellIconID == 3184 && m_spellInfo->SpellVisual[0] == 12495)
|
||||
amount = GetBase()->GetUnitOwner()->GetMaxPower(POWER_MANA) * 0.002f;
|
||||
}
|
||||
// Innervate
|
||||
else if (m_spellInfo->Id == 29166)
|
||||
break;
|
||||
case 61782: // Infinite Replenishment
|
||||
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());
|
||||
// Owlkin Frenzy
|
||||
else if (m_spellInfo->Id == 48391)
|
||||
break;
|
||||
case 48391: // Owlkin Frenzy
|
||||
ApplyPctU(amount, GetBase()->GetUnitOwner()->GetCreatePowers(POWER_MANA));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
if (!caster)
|
||||
|
||||
Reference in New Issue
Block a user