mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Units: further improvements for 7a08639397
Fixed an edge case in which units with SPELL_AURA_MOD_DAMAGE_FROM_MANA would deal zero damage when their total bonus or scaling coefficient would be zero
This commit is contained in:
@@ -6729,7 +6729,8 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage
|
||||
{
|
||||
float totalBonus = (owner->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_FROM_MANA, spellProto->GetSchoolMask()) - 1.f) * 100.f;
|
||||
float manaPct = 100.f* ((float)GetPower(POWER_MANA) / GetMaxPower(POWER_MANA));
|
||||
AddPct(DoneTotalMod, CalculatePct(totalBonus, manaPct));
|
||||
if (totalBonus != 0.f && manaPct != 0.f)
|
||||
AddPct(DoneTotalMod, CalculatePct(totalBonus, manaPct));
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
|
||||
Reference in New Issue
Block a user