* Update death checks to prevent death in ghost form, this "should" finnaly fix the perma death bug

--HG--
branch : trunk
This commit is contained in:
Biglad
2009-10-06 15:15:26 +01:00
parent 23d0a6c22b
commit 5722d5c402

View File

@@ -11960,8 +11960,8 @@ void Unit::SetHealth(uint32 val)
if(getDeathState() == JUST_DIED)
val = 0;
// causes instant permadeath if you exit game while in combat?! :-|
//else if((getDeathState() & (DEAD | DEAD_FALLING)) != 0)
// val = 1;
else if((GetTypeId() == TYPEID_PLAYER) && (getDeathState() & (DEAD | DEAD_FALLING)) != 0)
val = 1;
else
{
uint32 maxHealth = GetMaxHealth();