Core/Units: fixed a possible crash in Unit::MeleeDamageBonusDone

This commit is contained in:
Ovahlord committed 2022-09-20 21:24:48 +02:00
1 parent 6d64727029
commit 7630711eaa
1 file changed
+1 -1
+1 -1
View File
@@ -7554,7 +7554,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* victim, uint32 damage, WeaponAttackType
if (schoolMask & (1 << i))
maxModDamagePercentSchool = std::max(maxModDamagePercentSchool, GetFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT + i));
}
else
else if (spellProto)
maxModDamagePercentSchool = GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, spellProto->GetSchoolMask());
DoneTotalMod *= maxModDamagePercentSchool;