*Fix a bug that mind control cannot be cancelled.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-28 00:06:48 -05:00
parent 4e0d7e4f33
commit 71841e5f43

View File

@@ -341,11 +341,6 @@ void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket)
{
CHECK_PACKET_SIZE(recvPacket,5);
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
if(mover != _player && mover->GetTypeId()==TYPEID_PLAYER)
return;
// increments with every CANCEL packet, don't use for now
uint8 counter;
uint32 spellId;
@@ -356,18 +351,14 @@ void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket)
if(spellId==26679)
return;
if(mover->IsNonMeleeSpellCasted(false))
mover->InterruptNonMeleeSpells(false,spellId);
if(_player->IsNonMeleeSpellCasted(false))
_player->InterruptNonMeleeSpells(false,spellId);
}
void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
{
CHECK_PACKET_SIZE(recvPacket,4);
// ignore for remote control state
if(_player->m_mover != _player)
return;
uint32 spellId;
recvPacket >> spellId;
@@ -396,10 +387,6 @@ void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
{
CHECK_PACKET_SIZE(recvPacket, 8+4);
// ignore for remote control state
if(_player->m_mover != _player)
return;
uint64 guid;
uint32 spellId;
@@ -447,7 +434,7 @@ void WorldSession::HandleCancelAutoRepeatSpellOpcode( WorldPacket& /*recvPacket*
{
// may be better send SMSG_CANCEL_AUTO_REPEAT?
// cancel and prepare for deleting
_player->m_mover->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
_player->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
}
/// \todo Complete HandleCancelChanneling function