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

Port From (https://github.com/TrinityCore/TrinityCore/commit/c8b11f7e3db8b40a0c02a759d722dff0f7c55fe8)
This commit is contained in:
hondacrx
2021-11-03 11:55:52 -04:00
parent fde411266d
commit 049f8c758f
+1 -1
View File
@@ -466,7 +466,7 @@ namespace Game.Entities
public ulong GetHealth() { return m_unitData.Health; }
public void SetHealth(ulong val)
{
if (GetDeathState() == DeathState.JustDied)
if (GetDeathState() == DeathState.JustDied || GetDeathState() == DeathState.Corpse)
val = 0;
else if (IsTypeId(TypeId.Player) && GetDeathState() == DeathState.Dead)
val = 1;