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

@ -3,7 +3,7 @@
<!-- Port the lobby server accepts client connections on -->
<ListenPort>54994</ListenPort>
<AuthPort>54998</AuthPort>
<!-- Ip the lobby server listens on -->
<!-- Ip the lobby server listens on -->
<ListenIp>127.0.0.1</ListenIp>
<!-- Path of FFXIV dat files -->
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
@ -12,9 +12,9 @@
<!-- Port the world server listens for clients -->
<ZonePort>54992</ZonePort>
<!-- Address to connect to the rest server -->
<RestHost>127.0.0.1:80</RestHost>
<RestHost>127.0.0.1:80</RestHost>
<!-- Secret for server authentication -->
<ServerSecret>default</ServerSecret>
<ServerSecret>default</ServerSecret>
<!-- Connection settings for the mysql db -->
<Mysql>
<Host>127.0.0.1</Host>
@ -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() ) );