mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
Server Lobby boost scrapping ( does not link atm
This commit is contained in:
parent
b153c81e2e
commit
28b5fd0714
6 changed files with 13 additions and 16 deletions
|
@ -42,6 +42,8 @@ public:
|
|||
return m_pInih->GetReal( "", name, defaultValue );
|
||||
else if constexpr (std::is_same_v<T, std::string>)
|
||||
return m_pInih->Get( "", name, defaultValue );
|
||||
else if constexpr (std::is_same_v<T, bool>)
|
||||
return m_pInih->GetBoolean( "", name, defaultValue );
|
||||
else
|
||||
static_assert(always_false<T>::value, "non-exhaustive getter!");
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
|
|||
add_executable(sapphire_lobby ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
|
||||
|
||||
set_target_properties(sapphire_lobby PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
CXX_STANDARD 17
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
CXX_EXTENSIONS ON
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include <Crypt/blowfish.h>
|
||||
#include <Config/ConfigMgr.h>
|
||||
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
|
||||
#include "ServerLobby.h"
|
||||
#include "RestConnector.h"
|
||||
#include "LobbySession.h"
|
||||
|
@ -98,7 +96,7 @@ void Core::Network::GameConnection::OnRecv( std::vector< uint8_t >& buffer )
|
|||
|
||||
}
|
||||
|
||||
void Core::Network::GameConnection::OnError( const boost::system::error_code& error )
|
||||
void Core::Network::GameConnection::OnError( const asio::error_code& error )
|
||||
{
|
||||
g_log.info( "GameConnection closed: " + error.message() );
|
||||
}
|
||||
|
@ -500,7 +498,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets:
|
|||
generateEncryptionKey( *reinterpret_cast< uint32_t* >( &inPacket.data[ 100 ] ), key_phrase );
|
||||
m_bEncryptionInitialized = true;
|
||||
|
||||
auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 );
|
||||
auto pe1 = std::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 );
|
||||
*reinterpret_cast< uint32_t* >( &pe1->data()[ 0 ] ) = 0xE0003C2A;
|
||||
|
||||
BlowFish blowfish;
|
||||
|
@ -523,7 +521,7 @@ void Core::Network::GameConnection::handlePackets( const Core::Network::Packets:
|
|||
uint32_t id = *reinterpret_cast< uint32_t* >( &inPacket.data[ 0 ] );
|
||||
uint32_t timeStamp = *reinterpret_cast< uint32_t* >( &inPacket.data[ 4 ] );
|
||||
|
||||
auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 );
|
||||
auto pe4 = std::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 );
|
||||
*( unsigned int* ) ( &pe4->data()[ 0 ] ) = id;
|
||||
*( unsigned int* ) ( &pe4->data()[ 4 ] ) = timeStamp;
|
||||
sendSinglePacket( pe4 );
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <Network/PacketContainer.h>
|
||||
#include <Util/LockedQueue.h>
|
||||
|
||||
#include <asio.hpp>
|
||||
#include "LobbyPacketContainer.h"
|
||||
|
||||
#include "Forwards.h"
|
||||
|
@ -51,7 +52,7 @@ public:
|
|||
|
||||
void OnRecv( std::vector< uint8_t >& buffer ) override;
|
||||
|
||||
void OnError( const boost::system::error_code& error ) override;
|
||||
void OnError( const asio::error_code& error ) override;
|
||||
|
||||
void sendError( uint64_t sequence, uint32_t errorcode, uint16_t messageId, uint32_t tmpId );
|
||||
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
#include <thread>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
Core::Logger g_log;
|
||||
Core::Network::RestConnector g_restConnector;
|
||||
|
@ -37,7 +34,7 @@ ServerLobby::ServerLobby( const std::string& configPath ) :
|
|||
m_configPath( configPath ),
|
||||
m_numConnections( 0 )
|
||||
{
|
||||
m_pConfig = boost::shared_ptr< ConfigMgr >( new ConfigMgr );
|
||||
m_pConfig = std::shared_ptr< ConfigMgr >( new ConfigMgr );
|
||||
}
|
||||
|
||||
ServerLobby::~ServerLobby( void )
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
#define _CSERVERLOBBY_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include "Forwards.h"
|
||||
|
||||
|
@ -31,7 +30,7 @@ private:
|
|||
uint16_t m_port;
|
||||
std::string m_ip;
|
||||
|
||||
boost::shared_ptr< ConfigMgr > m_pConfig;
|
||||
std::shared_ptr< ConfigMgr > m_pConfig;
|
||||
|
||||
public:
|
||||
ServerLobby( const std::string& configPath );
|
||||
|
@ -47,7 +46,7 @@ public:
|
|||
m_sessionMap[ std::string( sessionId ) ] = pSession;
|
||||
}
|
||||
|
||||
boost::shared_ptr< ConfigMgr > getConfig() const;
|
||||
std::shared_ptr< ConfigMgr > getConfig() const;
|
||||
|
||||
LobbySessionPtr getSession( char* sessionId );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue