fix(Core/Server): Remove unnecessary HandleTeleportTimeout (#25013)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -366,8 +366,6 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
if (updater.ProcessUnsafe())
|
||||
UpdateTimeOutTime(diff);
|
||||
|
||||
HandleTeleportTimeout(updater.ProcessUnsafe());
|
||||
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
/// not process packets if socket already closed
|
||||
WorldPacket* packet = nullptr;
|
||||
@@ -608,36 +606,6 @@ bool WorldSession::IsSocketClosed() const
|
||||
return !m_Socket || !m_Socket->IsOpen();
|
||||
}
|
||||
|
||||
void WorldSession::HandleTeleportTimeout(bool updateInSessions)
|
||||
{
|
||||
// pussywizard: handle teleport ack timeout
|
||||
if (m_Socket && m_Socket->IsOpen() && GetPlayer() && GetPlayer()->IsBeingTeleported())
|
||||
{
|
||||
time_t currTime = GameTime::GetGameTime().count();
|
||||
if (updateInSessions) // session update from World::UpdateSessions
|
||||
{
|
||||
if (GetPlayer()->IsBeingTeleportedFar() && GetPlayer()->GetSemaphoreTeleportFar() + sWorld->getIntConfig(CONFIG_TELEPORT_TIMEOUT_FAR) < currTime)
|
||||
while (GetPlayer() && GetPlayer()->IsBeingTeleportedFar())
|
||||
HandleMoveWorldportAck();
|
||||
}
|
||||
else // session update from Map::Update
|
||||
{
|
||||
if (GetPlayer()->IsBeingTeleportedNear() && GetPlayer()->GetSemaphoreTeleportNear() + sWorld->getIntConfig(CONFIG_TELEPORT_TIMEOUT_NEAR) < currTime)
|
||||
while (GetPlayer() && GetPlayer()->IsInWorld() && GetPlayer()->IsBeingTeleportedNear())
|
||||
{
|
||||
Player* plMover = GetPlayer()->m_mover->ToPlayer();
|
||||
if (!plMover)
|
||||
break;
|
||||
WorldPacket pkt(MSG_MOVE_TELEPORT_ACK, 20);
|
||||
pkt << plMover->GetPackGUID();
|
||||
pkt << uint32(0); // flags
|
||||
pkt << uint32(0); // time
|
||||
HandleMoveTeleportAck(pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// %Log the player out
|
||||
void WorldSession::LogoutPlayer(bool save)
|
||||
{
|
||||
|
||||
@@ -1138,7 +1138,6 @@ public: // opcodes handlers
|
||||
void HandleEnterPlayerVehicle(WorldPacket& data);
|
||||
void HandleUpdateProjectilePosition(WorldPacket& recvPacket);
|
||||
|
||||
void HandleTeleportTimeout(bool updateInSessions);
|
||||
bool HandleSocketClosed();
|
||||
void SetOfflineTime(uint32 time) { _offlineTime = time; }
|
||||
uint32 GetOfflineTime() const { return _offlineTime; }
|
||||
|
||||
Reference in New Issue
Block a user