aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2019-08-01 01:26:44 +0200
committerTreeston <treeston.mmoc@gmail.com>2019-08-01 01:27:10 +0200
commit0b722e23cf0cdbd7b9753ffe77b349930c34779e (patch)
tree051cc3f4925d6f57dbb01667a4c12b99a85dd18f /src
parenta8b1b9a3c6266d589afb378f07c505f79c75a6a4 (diff)
Entities/Unit: fix an unrelated check from doing nothing because somebody didn't understand how type-casting works
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 0b53aae034a..021343c7177 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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)