Core/Unit: Successfully (?) prevented the zombie apocalypse. Corpses can no longer gain HP. Closes #22409.

This commit is contained in:
Treeston
2018-09-12 14:28:49 +02:00
committed by Aokromes
parent 0d4c7d612b
commit b7984e132c

View File

@@ -9828,7 +9828,7 @@ void Unit::SetLevel(uint8 lvl)
void Unit::SetHealth(uint32 val)
{
if (getDeathState() == JUST_DIED)
if (getDeathState() == JUST_DIED || getDeathState() == CORPSE)
val = 0;
else if (GetTypeId() == TYPEID_PLAYER && getDeathState() == DEAD)
val = 1;