aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-09-12 14:28:49 +0200
committerTreeston <treeston.mmoc@gmail.com>2018-09-12 14:28:49 +0200
commitf50a8e5926372400e87337fdcdcd03fd68a8a4c6 (patch)
tree96b6af2e71fc629f9ae305981d99bbac69418a3d /src
parentc8cecd95271443134a01256277b7d326526c2f01 (diff)
Core/Unit: Successfully (?) prevented the zombie apocalypse. Corpses can no longer gain HP. Closes #22409.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index c8e00647418..53b663aaa61 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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;