mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Fixed crash in HandleSetActiveMoverOpcode.
Removed not needed check and added check isinworld. --HG-- branch : trunk
This commit is contained in:
@@ -488,20 +488,18 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
if(guid == GetPlayer()->m_mover->GetGUID())
|
||||
return;
|
||||
|
||||
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||
{
|
||||
GetPlayer()->SetMover(mover);
|
||||
if(mover != GetPlayer() && mover->canFly())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
||||
data.append(mover->GetPackGUID());
|
||||
data << uint32(0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
if(GetPlayer()->IsInWorld())
|
||||
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||
{
|
||||
GetPlayer()->SetMover(mover);
|
||||
if(mover != GetPlayer() && mover->canFly())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
||||
data.append(mover->GetPackGUID());
|
||||
data << uint32(0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user