*Fix the bug that some vehicles cannot fly.
--HG-- branch : trunk
This commit is contained in:
@@ -459,7 +459,16 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
|
||||||
|
{
|
||||||
GetPlayer()->SetMover(mover);
|
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
|
else
|
||||||
{
|
{
|
||||||
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " I64FMT " and should be " I64FMT, guid, _player->m_mover->GetGUID());
|
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " I64FMT " and should be " I64FMT, guid, _player->m_mover->GetGUID());
|
||||||
|
|||||||
@@ -20215,13 +20215,6 @@ void Player::SetClientControl(Unit* target, uint8 allowMove)
|
|||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
if(target == this)
|
if(target == this)
|
||||||
SetMover(this);
|
SetMover(this);
|
||||||
else if(target->canFly())
|
|
||||||
{
|
|
||||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
|
||||||
data.append(target->GetPackGUID());
|
|
||||||
data << uint32(0);
|
|
||||||
SendDirectMessage(&data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UpdateZoneDependentAuras( uint32 newZone )
|
void Player::UpdateZoneDependentAuras( uint32 newZone )
|
||||||
|
|||||||
Reference in New Issue
Block a user