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:
@@ -466,7 +466,7 @@ namespace Game.Entities
|
|||||||
public ulong GetHealth() { return m_unitData.Health; }
|
public ulong GetHealth() { return m_unitData.Health; }
|
||||||
public void SetHealth(ulong val)
|
public void SetHealth(ulong val)
|
||||||
{
|
{
|
||||||
if (GetDeathState() == DeathState.JustDied)
|
if (GetDeathState() == DeathState.JustDied || GetDeathState() == DeathState.Corpse)
|
||||||
val = 0;
|
val = 0;
|
||||||
else if (IsTypeId(TypeId.Player) && GetDeathState() == DeathState.Dead)
|
else if (IsTypeId(TypeId.Player) && GetDeathState() == DeathState.Dead)
|
||||||
val = 1;
|
val = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user