diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/World.cpp | 2 | ||||
-rw-r--r-- | src/game/World.h | 1 | ||||
-rw-r--r-- | src/game/WorldSocket.cpp | 5 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 6 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp index dced43596a4..833687c74b1 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -662,6 +662,8 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME); m_configs[CONFIG_SOCKET_TIMEOUTTIME] = sConfig.GetIntDefault("SocketTimeOutTime", 900000); + m_configs[CONFIG_SESSION_ADD_DELAY] = sConfig.GetIntDefault("SessionAddDelay", 10000); + m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74); /// \todo Add MonsterSight and GuarderSight (with meaning) in Trinityd.conf or put them as define m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 50); diff --git a/src/game/World.h b/src/game/World.h index caf9a54d2c4..ddc804f1968 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -100,6 +100,7 @@ enum WorldConfigs CONFIG_PORT_WORLD, CONFIG_SOCKET_SELECTTIME, CONFIG_SOCKET_TIMEOUTTIME, + CONFIG_SESSION_ADD_DELAY, CONFIG_GROUP_XP_DISTANCE, CONFIG_SIGHT_MONSTER, CONFIG_SIGHT_GUARDER, diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index 98cfe84a379..559c1d88514 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -1001,8 +1001,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) m_Session->LoadTutorialsData(); m_Session->ReadAddonsInfo(recvPacket); - // In case needed sometime the second arg is in microseconds 1 000 000 = 1 sec - ACE_OS::sleep (ACE_Time_Value (0, 10000)); + // Sleep this Network thread for + uint32 sleepTime = sWorld.getConfig(CONFIG_SESSION_ADD_DELAY); + ACE_OS::sleep (ACE_Time_Value (0, sleepTime)); sWorld.AddSession (m_Session); diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index e260cdd11cd..a2560e1ce25 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -122,6 +122,11 @@ EAIErrorLevel = 2 # selection screen is disconnected. # Default: 900000 (15 minutes) # +# SessionAddDelay +# Time in microseconds that a network thread will sleep after authentication +# protocol and adding a connection to the world session map. +# Default: 10000 (10 milliseconds, 0,01 second) +# # GridCleanUpDelay # Grid clean up delay (in milliseconds) # Default: 300000 (5 min) @@ -226,6 +231,7 @@ MaxOverspeedPings = 2 GridUnload = 1 SocketSelectTime = 10000 SocketTimeOutTime = 900000 +SessionAddDelay = 10000 GridCleanUpDelay = 300000 MapUpdateInterval = 100 ChangeWeatherInterval = 600000 |