Fix SetHealthPercent causing bugged alive state.

This commit is contained in:
ratkosrb
2024-01-31 00:05:52 +02:00
parent 632503cfe1
commit 3de7fc330a
+2
View File
@@ -8098,6 +8098,8 @@ void Unit::SetMaxHealth(uint32 val)
void Unit::SetHealthPercent(float percent)
{
uint32 newHealth = GetMaxHealth() * percent / 100.0f;
if (percent > 0 && newHealth == 0)
newHealth = 1;
SetHealth(newHealth);
}