mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Unit: Ceil damage instead of rounding it
a0d5088850 followup, use std::ceil instead of std::round . This ensures at least 1 damage point will be done after applying armor reducing.
This commit is contained in:
@@ -1610,7 +1610,7 @@ void Unit::HandleEmoteCommand(uint32 emoteId)
|
||||
damageReduction /= (1.0f + damageReduction);
|
||||
|
||||
RoundToInterval(damageReduction, 0.f, 0.75f);
|
||||
return uint32(std::lroundf(std::max(damage * (1.0f - damageReduction), 0.0f)));
|
||||
return uint32(std::ceilf(std::max(damage * (1.0f - damageReduction), 0.0f)));
|
||||
}
|
||||
|
||||
/*static*/ uint32 Unit::CalcSpellResistedDamage(Unit const* attacker, Unit* victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const* spellInfo)
|
||||
|
||||
Reference in New Issue
Block a user