*Prevent players from casting spells while getDeathState() == DEAD (this blocks an exploit where players can skip all mobs/doors/etc in an instance and ressurect themselves at boss)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-01 07:06:42 -07:00
parent 51affe07d0
commit 55981782f0

View File

@@ -289,6 +289,12 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> spellId;
recvPacket >> unk_flags; // flags (if 0x02 - some additional data are received)
if(_player->getDeathState() == DEAD) // If DEAD player is casting spells, they're hacking. Better fix would be to prevent this from happening in the first place.
{
recvPacket.rpos(recvPacket.wpos()); // prevent warnings spam
return;
}
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
if(mover != _player && mover->GetTypeId()==TYPEID_PLAYER)