From 43df845233613237a93247c2a6fcd8ffb5d8eecf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 18 Jan 2020 21:42:51 -0500 Subject: [PATCH] Fix issue with overflow in Mob::SendHPUpdate --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 94b53d1f9..af8aa25ab 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1369,7 +1369,7 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal } } - int8 current_hp_percent = static_cast(max_hp == 0 ? 0 : static_cast(current_hp * 100 / max_hp)); + auto current_hp_percent = GetIntHPRatio(); Log(Logs::General, Logs::HPUpdate,