[7652] Fixed unexpected GM death at deep swim. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-11 23:11:37 -05:00
parent 88b4ecdb03
commit f1b2e437a4
+4
View File
@@ -319,11 +319,15 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
if(plMover->isAlive())
{
plMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
// pl can be alive if GM/etc
if(!plMover->isAlive())
{
// change the death state to CORPSE to prevent the death timer from
// starting in the next player update
plMover->KillPlayer();
plMover->BuildPlayerRepop();
}
}
// cancel the death timer here if started
plMover->RepopAtGraveyard();