Entities/Unit: fix an unrelated check from doing nothing because somebody didn't understand how type-casting works

This commit is contained in:
Treeston
2019-08-01 01:26:44 +02:00
parent a8b1b9a3c6
commit 0b722e23cf

View File

@@ -1580,7 +1580,7 @@ void Unit::HandleEmoteCommand(uint32 anim_id)
damageReduction /= (1.0f + damageReduction);
RoundToInterval(damageReduction, 0.f, 0.75f);
return std::max<uint32>(damage * (1.0f - damageReduction), 0);
return uint32(std::max(damage * (1.0f - damageReduction), 0.0f));
}
/*static*/ uint32 Unit::CalcSpellResistedDamage(Unit const* attacker, Unit* victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const* spellInfo)