*Do not allow to kill a dead player. (may generate two corpses and cause crash)

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-09 17:57:20 -06:00
parent a1eaec791e
commit 20947a4c73
+7 -1
View File
@@ -1330,8 +1330,14 @@ void Player::setDeathState(DeathState s)
bool cur = isAlive();
if(s == JUST_DIED && cur)
if(s == JUST_DIED)
{
if(!cur)
{
sLog.outError("setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow());
return;
}
// drunken state is cleared on death
SetDrunkValue(0);
// lost combo points at any target (targeted combo points clear in Unit::setDeathState)