mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9806] Fixed player loading to transport.
Bug exist already some time but possible hide by another code way work or client change maybe.
This commit is contained in:
parent
6146e19acb
commit
9e356f10c9
4 changed files with 18 additions and 8 deletions
|
|
@ -284,7 +284,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
{
|
||||
plMover->m_transport->RemovePassenger(plMover);
|
||||
plMover->m_transport = NULL;
|
||||
movementInfo.SetTransportData(0, 0.0f, 0.0f, 0.0f, 0.0f, 0, -1);
|
||||
movementInfo.ClearTransportData();
|
||||
}
|
||||
|
||||
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
|
||||
|
|
|
|||
|
|
@ -1656,7 +1656,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
{
|
||||
m_transport->RemovePassenger(this);
|
||||
m_transport = NULL;
|
||||
m_movementInfo.SetTransportData(0, 0.0f, 0.0f, 0.0f, 0.0f, 0, -1);
|
||||
m_movementInfo.ClearTransportData();
|
||||
}
|
||||
|
||||
// The player was ported to another map and looses the duel immediately.
|
||||
|
|
@ -15011,7 +15011,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
transGUID = 0;
|
||||
|
||||
m_movementInfo.SetTransportData(0, 0.0f, 0.0f, 0.0f, 0.0f, 0, -1);
|
||||
m_movementInfo.ClearTransportData();
|
||||
}
|
||||
|
||||
_LoadBGData(holder->GetResult(PLAYER_LOGIN_QUERY_LOADBGDATA));
|
||||
|
|
@ -15065,7 +15065,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
if (transGUID != 0)
|
||||
{
|
||||
m_movementInfo.SetTransportData(transGUID, fields[26].GetFloat(), fields[27].GetFloat(), fields[28].GetFloat(), fields[29].GetFloat(), 0, -1);
|
||||
m_movementInfo.SetTransportData(ObjectGuid(HIGHGUID_MO_TRANSPORT,transGUID), fields[26].GetFloat(), fields[27].GetFloat(), fields[28].GetFloat(), fields[29].GetFloat(), 0, -1);
|
||||
|
||||
if( !MaNGOS::IsValidMapCoord(
|
||||
GetPositionX() + m_movementInfo.GetTransportPos()->x, GetPositionY() + m_movementInfo.GetTransportPos()->y,
|
||||
|
|
@ -15079,7 +15079,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
RelocateToHomebind();
|
||||
|
||||
m_movementInfo.SetTransportData(0, 0.0f, 0.0f, 0.0f, 0.0f, 0, -1);
|
||||
m_movementInfo.ClearTransportData();
|
||||
|
||||
transGUID = 0;
|
||||
}
|
||||
|
|
@ -15113,7 +15113,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
RelocateToHomebind();
|
||||
|
||||
m_movementInfo.SetTransportData(0, 0.0f, 0.0f, 0.0f, 0.0f, 0, -1);
|
||||
m_movementInfo.ClearTransportData();
|
||||
|
||||
transGUID = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@ class MovementInfo
|
|||
|
||||
// Position manipulations
|
||||
Position const *GetPos() const { return &pos; }
|
||||
void SetTransportData(uint64 guid, float x, float y, float z, float o, uint32 time, int8 seat)
|
||||
void SetTransportData(ObjectGuid guid, float x, float y, float z, float o, uint32 time, int8 seat)
|
||||
{
|
||||
t_guid = guid;
|
||||
t_pos.x = x;
|
||||
|
|
@ -773,6 +773,16 @@ class MovementInfo
|
|||
t_time = time;
|
||||
t_seat = seat;
|
||||
}
|
||||
void ClearTransportData()
|
||||
{
|
||||
t_guid = ObjectGuid();
|
||||
t_pos.x = 0.0f;
|
||||
t_pos.y = 0.0f;
|
||||
t_pos.z = 0.0f;
|
||||
t_pos.o = 0.0f;
|
||||
t_time = 0;
|
||||
t_seat = -1;
|
||||
}
|
||||
ObjectGuid const& GetTransportGuid() const { return t_guid; }
|
||||
Position const *GetTransportPos() const { return &t_pos; }
|
||||
int8 GetTransportSeat() const { return t_seat; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9805"
|
||||
#define REVISION_NR "9806"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue