mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-05 08:59:54 -03:00
General cleanup of code and headers.
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\Dependency\sqlite;.\Dependency\bcrypt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
@@ -185,29 +185,35 @@
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Common\ByteStream.h" />
|
||||
<ClInclude Include="Common\Constant.h" />
|
||||
<ClInclude Include="Common\RLEZ.hpp" />
|
||||
<ClInclude Include="Common\Utility.h" />
|
||||
<ClInclude Include="configuration.h" />
|
||||
<ClInclude Include="Crypto\PasswordHash.h" />
|
||||
<ClInclude Include="Crypto\RealmCrypt.h" />
|
||||
<ClInclude Include="Crypto\rijndael.h" />
|
||||
<ClInclude Include="Database\Database.h" />
|
||||
<ClInclude Include="Discovery Server\DiscoveryServer.h" />
|
||||
<ClInclude Include="Game\ChatRoomSession.h" />
|
||||
<ClInclude Include="Game\ChatRoomManager.h" />
|
||||
<ClInclude Include="Game\Constant.hpp" />
|
||||
<ClInclude Include="Game\RealmCharacter.h" />
|
||||
<ClInclude Include="Game\RealmCharacterMetaKV.h" />
|
||||
<ClInclude Include="Game\RealmUser.h" />
|
||||
<ClInclude Include="Game\RealmUserManager.h" />
|
||||
<ClInclude Include="Game\GameSession.h" />
|
||||
<ClInclude Include="Game\GameSessionManager.h" />
|
||||
<ClInclude Include="global_define.h" />
|
||||
<ClInclude Include="Lobby Server\LobbyServer.h" />
|
||||
<ClInclude Include="logging.h" />
|
||||
<ClInclude Include="misc\ByteStream.h" />
|
||||
<ClInclude Include="misc\Utility.h" />
|
||||
<ClInclude Include="Network\Events.h" />
|
||||
<ClInclude Include="Network\Event\NotifyClientDiscovered.h" />
|
||||
<ClInclude Include="Network\Event\NotifyClientReqConnect.h" />
|
||||
<ClInclude Include="Network\Event\NotifyClientDiscovered_RTA.h" />
|
||||
<ClInclude Include="Network\Event\NotifyClientRequestConnect.h" />
|
||||
<ClInclude Include="Network\Event\NotifyForcedLogout.h" />
|
||||
<ClInclude Include="Network\Event\NotifyGameDiscovered.h" />
|
||||
<ClInclude Include="Network\Event\Notify_4C.h" />
|
||||
<ClInclude Include="Network\Event\NotifyClientRequestConnect_RTA.h" />
|
||||
<ClInclude Include="Network\Event\NotifyReserveUserSlot_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestCancelGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestCancelGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestCreateAccount.h" />
|
||||
@@ -218,6 +224,7 @@
|
||||
<ClInclude Include="Network\Event\RequestCreatePublicGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestDoClientDiscovery.h" />
|
||||
<ClInclude Include="Network\Event\RequestEnterRoom.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetCharacterData_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetEncryptionKey.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetGame_RTA.h" />
|
||||
@@ -230,43 +237,52 @@
|
||||
<ClInclude Include="Network\Event\RequestLogout.h" />
|
||||
<ClInclude Include="Network\Event\RequestMatchGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestMatchGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestSaveNewCharacter_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestCreateNewCharacter_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestSaveCharacter_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestStartGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestTouchSession.h" />
|
||||
<ClInclude Include="Network\Event\RequestUpdateGameData.h" />
|
||||
<ClInclude Include="Network\Event\Request_5B.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetNetCharacterList_RTA.h" />
|
||||
<ClInclude Include="Network\Event\Request_5D.h" />
|
||||
<ClInclude Include="Network\Event\Request_5F.h" />
|
||||
<ClInclude Include="Network\Event\Request_61.h" />
|
||||
<ClInclude Include="Network\GenericNetMessage.hpp" />
|
||||
<ClInclude Include="Network\GenericNetRequest.hpp" />
|
||||
<ClInclude Include="Network\GenericNetResponse.hpp" />
|
||||
<ClInclude Include="Network\GenericNetMessage.h" />
|
||||
<ClInclude Include="Network\GenericNetRequest.h" />
|
||||
<ClInclude Include="Network\GenericNetResponse.h" />
|
||||
<ClInclude Include="network\RealmSocket.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Common\ByteStream.cpp" />
|
||||
<ClCompile Include="Common\Utility.cpp" />
|
||||
<ClCompile Include="configuration.cpp" />
|
||||
<ClCompile Include="Crypto\PasswordHash.cpp" />
|
||||
<ClCompile Include="Crypto\RealmCrypt.cpp" />
|
||||
<ClCompile Include="Crypto\rijndael.cpp" />
|
||||
<ClCompile Include="Database\Database.cpp" />
|
||||
<ClCompile Include="Dependency\sqlite\sqlite3.c" />
|
||||
<ClCompile Include="Discovery Server\DiscoveryServer.cpp" />
|
||||
<ClCompile Include="Game\ChatRoom.cpp" />
|
||||
<ClCompile Include="Game\ChatRoomManager.cpp" />
|
||||
<ClCompile Include="Game\RealmCharacter.cpp" />
|
||||
<ClCompile Include="Game\RealmCharacterMetaKV.cpp" />
|
||||
<ClCompile Include="Game\RealmUser.cpp" />
|
||||
<ClCompile Include="Game\RealmUserManager.cpp" />
|
||||
<ClCompile Include="Game\GameSession.cpp" />
|
||||
<ClCompile Include="Game\GameSessionManager.cpp" />
|
||||
<ClCompile Include="global_define.cpp" />
|
||||
<ClCompile Include="Lobby Server\LobbyServer.cpp" />
|
||||
<ClCompile Include="logging.cpp" />
|
||||
<ClCompile Include="misc\ByteStream.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="misc\Utility.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyClientDiscovered.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyClientReqConnect.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyClientDiscovered_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyClientRequestConnect.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyForcedLogout.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyGameDiscovered.cpp" />
|
||||
<ClCompile Include="Network\Event\Notify_4C.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyClientRequestConnect_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\NotifyReserveUserSlot_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCancelGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCancelGame_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCreateAccount.cpp" />
|
||||
@@ -277,6 +293,7 @@
|
||||
<ClCompile Include="Network\Event\RequestCreatePublicGame_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestDoClientDiscovery.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestEnterRoom.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetCharacterData_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetEncryptionKey.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetGame_RTA.cpp" />
|
||||
@@ -287,14 +304,18 @@
|
||||
<ClCompile Include="Network\Event\RequestLogin.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestLogout.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestMatchGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestSaveNewCharacter_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCreateNewCharacter_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestSaveCharacter_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestStartGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestTouchSession.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestUpdateGameData.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetPublicRooms.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestMatchGame_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\Request_5B.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetNetCharacterList_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\Request_5D.cpp" />
|
||||
<ClCompile Include="Network\Event\Request_5F.cpp" />
|
||||
<ClCompile Include="Network\Event\Request_61.cpp" />
|
||||
<ClCompile Include="Network\GenericNetRequest.cpp" />
|
||||
<ClCompile Include="network\RealmSocket.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
|
||||
@@ -51,6 +51,18 @@
|
||||
<Filter Include="Header Files\Network\Event">
|
||||
<UniqueIdentifier>{48da1e06-b5a7-49cd-b264-12389d181a65}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Dependency">
|
||||
<UniqueIdentifier>{f3eef755-c7e8-4aa0-9b12-18defb183e51}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\Database">
|
||||
<UniqueIdentifier>{72ca5d8f-75d7-45b0-92fe-890fe17b53e8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\Database">
|
||||
<UniqueIdentifier>{2de5b54c-130c-46a4-a16b-ee1c841c7b48}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Dependency\sqlite3">
|
||||
<UniqueIdentifier>{9a0761e6-3beb-491a-9c4c-8e8fc3c8baf5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
@@ -62,25 +74,16 @@
|
||||
<ClInclude Include="network\RealmSocket.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="global_define.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="misc\Utility.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="misc\ByteStream.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="logging.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\GenericNetRequest.hpp">
|
||||
<ClInclude Include="Network\GenericNetRequest.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\GenericNetResponse.hpp">
|
||||
<ClInclude Include="Network\GenericNetResponse.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Lobby Server\LobbyServer.h">
|
||||
@@ -104,7 +107,7 @@
|
||||
<ClInclude Include="Game\GameSessionManager.h">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\GenericNetMessage.hpp">
|
||||
<ClInclude Include="Network\GenericNetMessage.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="configuration.h">
|
||||
@@ -113,19 +116,16 @@
|
||||
<ClInclude Include="Crypto\RealmCrypt.h">
|
||||
<Filter>Header Files\Crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\Constant.hpp">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyClientDiscovered.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyClientReqConnect.h">
|
||||
<ClInclude Include="Network\Event\NotifyClientRequestConnect.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyGameDiscovered.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_5B.h">
|
||||
<ClInclude Include="Network\Event\RequestGetNetCharacterList_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_5D.h">
|
||||
@@ -197,7 +197,7 @@
|
||||
<ClInclude Include="Network\Events.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestSaveNewCharacter_RTA.h">
|
||||
<ClInclude Include="Network\Event\RequestCreateNewCharacter_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestGetGame_RTA.h">
|
||||
@@ -227,23 +227,56 @@
|
||||
<ClInclude Include="Network\Event\NotifyClientRequestConnect_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyReserveUserSlot_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestGetCharacterData_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Database\Database.h">
|
||||
<Filter>Header Files\Database</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\RealmCharacter.h">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\RealmCharacterMetaKV.h">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\ByteStream.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Constant.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\Utility.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Crypto\PasswordHash.h">
|
||||
<Filter>Header Files\Crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyClientDiscovered_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_5F.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestSaveCharacter_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\RLEZ.hpp">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestStartGame.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="global_define.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="misc\Utility.cpp">
|
||||
<Filter>Source Files\Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="misc\ByteStream.cpp">
|
||||
<Filter>Source Files\Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="logging.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -280,7 +313,7 @@
|
||||
<ClCompile Include="Network\Event\NotifyClientDiscovered.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\NotifyClientReqConnect.cpp">
|
||||
<ClCompile Include="Network\Event\NotifyClientRequestConnect.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\NotifyGameDiscovered.cpp">
|
||||
@@ -289,7 +322,7 @@
|
||||
<ClCompile Include="Network\Event\RequestGetPublicRooms.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_5B.cpp">
|
||||
<ClCompile Include="Network\Event\RequestGetNetCharacterList_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_5D.cpp">
|
||||
@@ -355,7 +388,7 @@
|
||||
<ClCompile Include="Network\Event\RequestUpdateGameData.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestSaveNewCharacter_RTA.cpp">
|
||||
<ClCompile Include="Network\Event\RequestCreateNewCharacter_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestGetGame_RTA.cpp">
|
||||
@@ -385,6 +418,48 @@
|
||||
<ClCompile Include="Network\Event\NotifyClientRequestConnect_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\NotifyReserveUserSlot_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestGetCharacterData_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Database\Database.cpp">
|
||||
<Filter>Source Files\Database</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Dependency\sqlite\sqlite3.c">
|
||||
<Filter>Dependency\sqlite3</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\GenericNetRequest.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game\RealmCharacter.cpp">
|
||||
<Filter>Source Files\Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game\RealmCharacterMetaKV.cpp">
|
||||
<Filter>Source Files\Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\ByteStream.cpp">
|
||||
<Filter>Source Files\Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\Utility.cpp">
|
||||
<Filter>Source Files\Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Crypto\PasswordHash.cpp">
|
||||
<Filter>Source Files\Crypto</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\NotifyClientDiscovered_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_5F.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestSaveCharacter_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestStartGame.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Norrath Server.rc" />
|
||||
|
||||
@@ -8,4 +8,8 @@
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)bin</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)bin</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
#include "global_define.h"
|
||||
#include "configuration.h"
|
||||
|
||||
bool Config::Load( std::string filename )
|
||||
{
|
||||
service_ip = "0.0.0.0";
|
||||
lobby_port = 40801;
|
||||
con_lobby_port = 40801;
|
||||
rta_lobby_port = 40810;
|
||||
discovery_port = 10101;
|
||||
|
||||
// Read configuration from ini file
|
||||
@@ -37,9 +36,13 @@ bool Config::Load( std::string filename )
|
||||
{
|
||||
service_ip = value;
|
||||
}
|
||||
else if( key == "lobby_port" )
|
||||
else if( key == "con_lobby_port" )
|
||||
{
|
||||
lobby_port = std::stoi( value );
|
||||
con_lobby_port = std::stoi( value );
|
||||
}
|
||||
else if (key == "rta_lobby_port")
|
||||
{
|
||||
rta_lobby_port = std::stoi(value);
|
||||
}
|
||||
else if( key == "discovery_port" )
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ public:
|
||||
static bool Load( std::string filename );
|
||||
|
||||
static inline std::string service_ip;
|
||||
static inline uint16_t lobby_port;
|
||||
static inline uint16_t con_lobby_port;
|
||||
static inline uint16_t rta_lobby_port;
|
||||
static inline uint16_t discovery_port;
|
||||
};
|
||||
36
logging.cpp
36
logging.cpp
@@ -1,6 +1,8 @@
|
||||
|
||||
#include <fstream>
|
||||
#include "logging.h"
|
||||
|
||||
|
||||
static const char* LOG_PATH[] = {
|
||||
"./generic",
|
||||
"./debug",
|
||||
@@ -157,6 +159,7 @@ void Log::Packet( std::vector<uint8_t> p, size_t size, bool send )
|
||||
{
|
||||
if( i > 0 )
|
||||
{
|
||||
// Print ASCII characters for the previous line
|
||||
printf( " " );
|
||||
for( uint8_t j = 0; j < r; ++j )
|
||||
{
|
||||
@@ -171,7 +174,7 @@ void Log::Packet( std::vector<uint8_t> p, size_t size, bool send )
|
||||
|
||||
line[ r++ ] = p[ i ];
|
||||
|
||||
|
||||
// Highlight packet type or flags
|
||||
if( i == 4 || i == 5 )
|
||||
{
|
||||
SetConsoleTextAttribute( hConsole, send ? 11 : 10 );
|
||||
@@ -186,7 +189,7 @@ void Log::Packet( std::vector<uint8_t> p, size_t size, bool send )
|
||||
++i;
|
||||
}
|
||||
|
||||
|
||||
// Padding for incomplete final line
|
||||
if( r > 0 )
|
||||
{
|
||||
for( uint8_t j = r; j < 16; ++j )
|
||||
@@ -202,3 +205,32 @@ void Log::Packet( std::vector<uint8_t> p, size_t size, bool send )
|
||||
|
||||
printf( "\n\n" );
|
||||
}
|
||||
|
||||
void Log::PacketToFile( std::string prefix, std::vector<uint8_t> p, size_t size)
|
||||
{
|
||||
static char timestamp[64] = "";
|
||||
|
||||
time_t t; time(&t);
|
||||
struct tm date_tm;
|
||||
localtime_s(&date_tm, &t);
|
||||
|
||||
_snprintf_s(timestamp, _TRUNCATE, 63,
|
||||
"%02d-%02d-%02d.packet.bin",
|
||||
date_tm.tm_hour,
|
||||
date_tm.tm_min,
|
||||
date_tm.tm_sec);
|
||||
|
||||
std::string filename = prefix + '_' + timestamp;
|
||||
|
||||
std::fstream file;
|
||||
file.open(filename, std::ios::out | std::ios::binary);
|
||||
|
||||
if (!file.is_open())
|
||||
{
|
||||
Error("Failed to open packet log file: %s", filename.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
file.write(reinterpret_cast<const char*>(p.data()), size);
|
||||
file.close();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
class Log {
|
||||
private:
|
||||
@@ -41,4 +41,5 @@ public:
|
||||
static void Debug( std::string format, ... );
|
||||
static void Error( std::string format, ... );
|
||||
static void Packet( std::vector< uint8_t > p, size_t size, bool send );
|
||||
static void PacketToFile( std::string prefix, std::vector< uint8_t > p, size_t size );
|
||||
};
|
||||
13
main.cpp
13
main.cpp
@@ -1,5 +1,14 @@
|
||||
#include "stdafx.h"
|
||||
#include "global_define.h"
|
||||
|
||||
#include <winsock2.h>
|
||||
|
||||
#include "logging.h"
|
||||
#include "configuration.h"
|
||||
#include "Database/Database.h"
|
||||
#include "Lobby Server/LobbyServer.h"
|
||||
#include "Discovery Server/DiscoveryServer.h"
|
||||
|
||||
|
||||
|
||||
static void ShowStartup()
|
||||
{
|
||||
@@ -50,6 +59,8 @@ int main()
|
||||
auto &discovery_server = DiscoveryServer::Get();
|
||||
discovery_server.Start( Config::service_ip, Config::discovery_port );
|
||||
|
||||
auto &database = Database::Get();
|
||||
|
||||
while( true )
|
||||
{
|
||||
if( !lobby_server.isRunning() )
|
||||
|
||||
Reference in New Issue
Block a user