fix(Core/Server): Remove unnecessary HandleTeleportTimeout (#25013)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-05 21:21:38 -06:00
committed by GitHub
parent 34b70f844e
commit f5a47a9db7
5 changed files with 0 additions and 51 deletions

View File

@@ -4613,20 +4613,6 @@ Calculate.Creature.Zone.Area.Data = 0
Calculate.Gameoject.Zone.Area.Data = 0
#
# TeleportTimeoutNear
# Description: No description
# Default: 25
TeleportTimeoutNear = 25
#
# TeleportTimeoutFar
# Description: No description
# Default: 45
TeleportTimeoutFar = 45
#
# DailyRBGArenaPoints.MinLevel
# Description: Allows gaining arena points on the first RBG win at level 70.

View File

@@ -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)
{

View File

@@ -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; }

View File

@@ -304,8 +304,6 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<uint32>(CONFIG_LOGDB_CLEARINTERVAL, "LogDB.Opt.ClearInterval", 10, ConfigValueCache::Reloadable::Yes, [](uint32 const& value) { return value > 0; }, "> 0");
SetConfigValue<uint32>(CONFIG_LOGDB_CLEARTIME, "LogDB.Opt.ClearTime", 1209600);
SetConfigValue<uint32>(CONFIG_TELEPORT_TIMEOUT_NEAR, "TeleportTimeoutNear", 25);
SetConfigValue<uint32>(CONFIG_TELEPORT_TIMEOUT_FAR, "TeleportTimeoutFar", 45);
SetConfigValue<uint32>(CONFIG_MAX_ALLOWED_MMR_DROP, "MaxAllowedMMRDrop", 500);
SetConfigValue<bool>(CONFIG_ENABLE_LOGIN_AFTER_DC, "EnableLoginAfterDC", true);
SetConfigValue<bool>(CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS, "DontCacheRandomMovementPaths", false);

View File

@@ -300,8 +300,6 @@ enum ServerConfigs
CONFIG_NUMTHREADS,
CONFIG_LOGDB_CLEARINTERVAL,
CONFIG_LOGDB_CLEARTIME,
CONFIG_TELEPORT_TIMEOUT_NEAR,
CONFIG_TELEPORT_TIMEOUT_FAR,
CONFIG_MAX_ALLOWED_MMR_DROP,
CONFIG_CLIENTCACHE_VERSION,
CONFIG_GUILD_EVENT_LOG_COUNT,