diff options
author | maximius <none@none> | 2009-09-01 07:06:42 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-01 07:06:42 -0700 |
commit | 55981782f0bdad5f80de8feeee793ae7f551e826 (patch) | |
tree | bcb9fce4d9d6c75221c76c99f8b1bd2219db5766 /src/game/SpellHandler.cpp | |
parent | 51affe07d01f4dbbf91a173240e965f6b9b3086e (diff) |
*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
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r-- | src/game/SpellHandler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 13d469c918b..b390becd356 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -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) |