diff options
author | megamage <none@none> | 2008-12-09 17:57:20 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-09 17:57:20 -0600 |
commit | 20947a4c730a68232d901d87cdb06035b6f2573d (patch) | |
tree | 8a82c4c34f430c9cce90b571fc06281499334603 /src | |
parent | a1eaec791ea6757b99b0ceea07edf5cc09380a69 (diff) |
*Do not allow to kill a dead player. (may generate two corpses and cause crash)
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e5c046034f4..5b5c859097f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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) |