1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 22:17:45 +00:00

Fixed a PS4 oversight

This commit is contained in:
amibu 2017-08-11 12:56:58 +02:00
parent 0beb5309a6
commit 3682b11478
2 changed files with 17 additions and 3 deletions

View file

@ -24,4 +24,8 @@
<Database>sapphire</Database>
</Mysql>
</General>
<Parameters>
<!-- Do not disconnect players without a session - this should be definitely disabled unless you are testing on a PS4 -->
<AllowNoSessionConnect>false</AllowNoSessionConnect>
</Parameters>
</Settings>

View file

@ -223,6 +223,16 @@ void Core::Network::GameConnection::enterWorld( FFXIVARR_PACKET_RAW& packet, uin
bool Core::Network::GameConnection::sendServiceAccountList( FFXIVARR_PACKET_RAW& packet, uint32_t tmpId )
{
LobbySessionPtr pSession = g_serverLobby.getSession( ( char* )&packet.data[0] + 0x20 );
if( g_serverLobby.m_pConfig->getValue<bool>( "Settings.Parameters.AllowNoSessionConnect" ) && pSession == nullptr )
{
LobbySessionPtr session( new Core::LobbySession() );
session->setAccountID( 0 );
session->setSessionId( (uint8_t *)&packet.data[0] + 0x20 );
pSession = session;
g_log.Log( LoggingSeverity::info, "Allowed connection with no session: " + std::string( (char*)&packet.data[0] + 0x20 ) );
}
if( pSession != nullptr )
{
g_log.Log( LoggingSeverity::info, "Found session linked to accountId: " + std::to_string( pSession->getAccountID() ) );