fix(Core/Server): Remove unnecessary HandleTeleportTimeout (#25013)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -4613,20 +4613,6 @@ Calculate.Creature.Zone.Area.Data = 0
|
|||||||
|
|
||||||
Calculate.Gameoject.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
|
# DailyRBGArenaPoints.MinLevel
|
||||||
# Description: Allows gaining arena points on the first RBG win at level 70.
|
# Description: Allows gaining arena points on the first RBG win at level 70.
|
||||||
|
|||||||
@@ -366,8 +366,6 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
|||||||
if (updater.ProcessUnsafe())
|
if (updater.ProcessUnsafe())
|
||||||
UpdateTimeOutTime(diff);
|
UpdateTimeOutTime(diff);
|
||||||
|
|
||||||
HandleTeleportTimeout(updater.ProcessUnsafe());
|
|
||||||
|
|
||||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||||
/// not process packets if socket already closed
|
/// not process packets if socket already closed
|
||||||
WorldPacket* packet = nullptr;
|
WorldPacket* packet = nullptr;
|
||||||
@@ -608,36 +606,6 @@ bool WorldSession::IsSocketClosed() const
|
|||||||
return !m_Socket || !m_Socket->IsOpen();
|
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
|
/// %Log the player out
|
||||||
void WorldSession::LogoutPlayer(bool save)
|
void WorldSession::LogoutPlayer(bool save)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1138,7 +1138,6 @@ public: // opcodes handlers
|
|||||||
void HandleEnterPlayerVehicle(WorldPacket& data);
|
void HandleEnterPlayerVehicle(WorldPacket& data);
|
||||||
void HandleUpdateProjectilePosition(WorldPacket& recvPacket);
|
void HandleUpdateProjectilePosition(WorldPacket& recvPacket);
|
||||||
|
|
||||||
void HandleTeleportTimeout(bool updateInSessions);
|
|
||||||
bool HandleSocketClosed();
|
bool HandleSocketClosed();
|
||||||
void SetOfflineTime(uint32 time) { _offlineTime = time; }
|
void SetOfflineTime(uint32 time) { _offlineTime = time; }
|
||||||
uint32 GetOfflineTime() const { return _offlineTime; }
|
uint32 GetOfflineTime() const { return _offlineTime; }
|
||||||
|
|||||||
@@ -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_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_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<uint32>(CONFIG_MAX_ALLOWED_MMR_DROP, "MaxAllowedMMRDrop", 500);
|
||||||
SetConfigValue<bool>(CONFIG_ENABLE_LOGIN_AFTER_DC, "EnableLoginAfterDC", true);
|
SetConfigValue<bool>(CONFIG_ENABLE_LOGIN_AFTER_DC, "EnableLoginAfterDC", true);
|
||||||
SetConfigValue<bool>(CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS, "DontCacheRandomMovementPaths", false);
|
SetConfigValue<bool>(CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS, "DontCacheRandomMovementPaths", false);
|
||||||
|
|||||||
@@ -300,8 +300,6 @@ enum ServerConfigs
|
|||||||
CONFIG_NUMTHREADS,
|
CONFIG_NUMTHREADS,
|
||||||
CONFIG_LOGDB_CLEARINTERVAL,
|
CONFIG_LOGDB_CLEARINTERVAL,
|
||||||
CONFIG_LOGDB_CLEARTIME,
|
CONFIG_LOGDB_CLEARTIME,
|
||||||
CONFIG_TELEPORT_TIMEOUT_NEAR,
|
|
||||||
CONFIG_TELEPORT_TIMEOUT_FAR,
|
|
||||||
CONFIG_MAX_ALLOWED_MMR_DROP,
|
CONFIG_MAX_ALLOWED_MMR_DROP,
|
||||||
CONFIG_CLIENTCACHE_VERSION,
|
CONFIG_CLIENTCACHE_VERSION,
|
||||||
CONFIG_GUILD_EVENT_LOG_COUNT,
|
CONFIG_GUILD_EVENT_LOG_COUNT,
|
||||||
|
|||||||
Reference in New Issue
Block a user