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
parent c8cecd9527
commit f50a8e5926

View File

@@ -9255,7 +9255,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;