Core/Spells: fixed mage Mana Adept mastery
This commit is contained in:
1 parent
413507011d
commit
b672eddd1d
3 files changed
+14
-2
No files matched your search
@@ -6676,6 +6676,18 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage
|
||||
}
|
||||
}
|
||||
|
||||
// Add SPELL_AURA_MOD_DAMAGE_FROM_MANA percent bonus
|
||||
AuraEffectList const& mDamageFromManaPct = owner->GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_FROM_MANA);
|
||||
for (AuraEffectList::const_iterator i = mDamageFromManaPct.begin(); i != mDamageFromManaPct.end(); ++i)
|
||||
{
|
||||
if (GetPower(POWER_MANA))
|
||||
{
|
||||
uint32 masteryBonus = (*i)->GetAmount();
|
||||
float manaPct = 100.f * GetPower(POWER_MANA) / GetMaxPower(POWER_MANA);
|
||||
AddPct(DoneTotalMod, CalculatePct(masteryBonus, manaPct));
|
||||
}
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user