mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-05 08:59:54 -03:00
Project Rename to "Champions Reborn"
This commit is contained in:
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28729.10
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Norrath Server", "Norrath Server.vcxproj", "{08A65603-4FF0-426E-9FF8-1772F199F49B}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Champions Reborn Server", "Champions Reborn Server.vcxproj", "{08A65603-4FF0-426E-9FF8-1772F199F49B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -24,7 +24,7 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>MasterServer</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>Norrath Server</ProjectName>
|
||||
<ProjectName>Champions Reborn Server</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -81,7 +81,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>.\bin\</OutDir>
|
||||
<TargetName>NorrathServer_64</TargetName>
|
||||
<TargetName>Server_64</TargetName>
|
||||
<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -92,6 +92,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>Server_64</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -125,15 +126,16 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\Dependency\sqlite;.\Dependency\bcrypt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\Dependency\sqlite\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>.\lib</AdditionalLibraryDirectories>
|
||||
<OutputFile>.\bin\NorrathServer_64.exe</OutputFile>
|
||||
<OutputFile>.\bin\Server_64.exe</OutputFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
@@ -167,13 +169,13 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\dependency\wolfssl;..\dependency\boost;..\dependency\json;..\dependency\clementine_ui\include;..\tools\src\;..\dependency\asio\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>.\Dependency\sqlite\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -185,8 +187,10 @@
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Common\ByteBufferReader.hpp" />
|
||||
<ClInclude Include="Common\ByteStream.h" />
|
||||
<ClInclude Include="Common\Constant.h" />
|
||||
<ClInclude Include="Common\ForwardDecl.h" />
|
||||
<ClInclude Include="Common\RLEZ.hpp" />
|
||||
<ClInclude Include="Common\Utility.h" />
|
||||
<ClInclude Include="configuration.h" />
|
||||
@@ -195,10 +199,12 @@
|
||||
<ClInclude Include="Crypto\rijndael.h" />
|
||||
<ClInclude Include="Database\Database.h" />
|
||||
<ClInclude Include="Discovery Server\DiscoveryServer.h" />
|
||||
<ClInclude Include="Game\CharacterSaveManager.h" />
|
||||
<ClInclude Include="Game\ChatRoomSession.h" />
|
||||
<ClInclude Include="Game\ChatRoomManager.h" />
|
||||
<ClInclude Include="Game\RealmCharacter.h" />
|
||||
<ClInclude Include="Game\RealmCharacterMetaKV.h" />
|
||||
<ClInclude Include="Game\CharacterSaveTask.h" />
|
||||
<ClInclude Include="Game\RealmUser.h" />
|
||||
<ClInclude Include="Game\RealmUserManager.h" />
|
||||
<ClInclude Include="Game\GameSession.h" />
|
||||
@@ -214,6 +220,7 @@
|
||||
<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\NotifyRoomMessage.h" />
|
||||
<ClInclude Include="Network\Event\RequestCancelGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestCancelGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestCreateAccount.h" />
|
||||
@@ -227,25 +234,28 @@
|
||||
<ClInclude Include="Network\Event\RequestGetCharacterData_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetEncryptionKey.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestDoClientDiscovery_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetPublicRooms.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetRealmStats.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetRoom.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetRules.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetServerAddress.h" />
|
||||
<ClInclude Include="Network\Event\RequestLeaveRoom.h" />
|
||||
<ClInclude Include="Network\Event\RequestLogin.h" />
|
||||
<ClInclude Include="Network\Event\RequestLogout.h" />
|
||||
<ClInclude Include="Network\Event\RequestMatchGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestMatchGame_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestCreateNewCharacter_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestSaveCharacter_RTA.h" />
|
||||
<ClInclude Include="Network\Event\RequestSendRoomMessage.h" />
|
||||
<ClInclude Include="Network\Event\RequestStartGame.h" />
|
||||
<ClInclude Include="Network\Event\RequestTouchSession.h" />
|
||||
<ClInclude Include="Network\Event\RequestUpdateGameData.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\Event\RequestAppendCharacterData.h" />
|
||||
<ClInclude Include="Network\Event\RequestUserJoinSuccess.h" />
|
||||
<ClInclude Include="Network\Event\RequestGetFriendList.h" />
|
||||
<ClInclude Include="Network\GenericNetMessage.h" />
|
||||
<ClInclude Include="Network\GenericNetRequest.h" />
|
||||
<ClInclude Include="Network\GenericNetResponse.h" />
|
||||
@@ -264,10 +274,12 @@
|
||||
<ClCompile Include="Database\Database.cpp" />
|
||||
<ClCompile Include="Dependency\sqlite\sqlite3.c" />
|
||||
<ClCompile Include="Discovery Server\DiscoveryServer.cpp" />
|
||||
<ClCompile Include="Game\CharacterSaveManager.cpp" />
|
||||
<ClCompile Include="Game\ChatRoom.cpp" />
|
||||
<ClCompile Include="Game\ChatRoomManager.cpp" />
|
||||
<ClCompile Include="Game\RealmCharacter.cpp" />
|
||||
<ClCompile Include="Game\RealmCharacterMetaKV.cpp" />
|
||||
<ClCompile Include="Game\RealmCharacterSaveTask.cpp" />
|
||||
<ClCompile Include="Game\RealmUser.cpp" />
|
||||
<ClCompile Include="Game\RealmUserManager.cpp" />
|
||||
<ClCompile Include="Game\GameSession.cpp" />
|
||||
@@ -283,6 +295,7 @@
|
||||
<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\NotifyRoomMessage.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCancelGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCancelGame_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCreateAccount.cpp" />
|
||||
@@ -296,25 +309,28 @@
|
||||
<ClCompile Include="Network\Event\RequestGetCharacterData_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetEncryptionKey.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestDoClientDiscovery_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetGame_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetRealmStats.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetRoom.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetRules.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetServerAddress.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestLeaveRoom.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestLogin.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestLogout.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestMatchGame.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestCreateNewCharacter_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestSaveCharacter_RTA.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestSendRoomMessage.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\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\Event\RequestAppendCharacterData.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestUserJoinSuccess.cpp" />
|
||||
<ClCompile Include="Network\Event\RequestGetFriendList.cpp" />
|
||||
<ClCompile Include="Network\GenericNetRequest.cpp" />
|
||||
<ClCompile Include="network\RealmSocket.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
@@ -325,7 +341,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Norrath Server.rc" />
|
||||
<ResourceCompile Include="Champions Server.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="C:\Users\Adam\Desktop\icon.ico" />
|
||||
@@ -128,10 +128,10 @@
|
||||
<ClInclude Include="Network\Event\RequestGetNetCharacterList_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_5D.h">
|
||||
<ClInclude Include="Network\Event\RequestAppendCharacterData.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_61.h">
|
||||
<ClInclude Include="Network\Event\RequestGetFriendList.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestCancelGame.h">
|
||||
@@ -200,7 +200,7 @@
|
||||
<ClInclude Include="Network\Event\RequestCreateNewCharacter_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestGetGame_RTA.h">
|
||||
<ClInclude Include="Network\Event\RequestDoClientDiscovery_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestCreatePrivateRoom.h">
|
||||
@@ -257,7 +257,7 @@
|
||||
<ClInclude Include="Network\Event\NotifyClientDiscovered_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\Request_5F.h">
|
||||
<ClInclude Include="Network\Event\RequestUserJoinSuccess.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestSaveCharacter_RTA.h">
|
||||
@@ -269,6 +269,30 @@
|
||||
<ClInclude Include="Network\Event\RequestStartGame.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\ByteBufferReader.hpp">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\CharacterSaveTask.h">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\CharacterSaveManager.h">
|
||||
<Filter>Header Files\Game</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\NotifyRoomMessage.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestLeaveRoom.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestSendRoomMessage.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Common\ForwardDecl.h">
|
||||
<Filter>Header Files\Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Network\Event\RequestGetGame_RTA.h">
|
||||
<Filter>Header Files\Network\Event</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
@@ -325,13 +349,13 @@
|
||||
<ClCompile Include="Network\Event\RequestGetNetCharacterList_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_5D.cpp">
|
||||
<ClCompile Include="Network\Event\RequestAppendCharacterData.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestMatchGame_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_61.cpp">
|
||||
<ClCompile Include="Network\Event\RequestGetFriendList.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestCancelGame.cpp">
|
||||
@@ -391,7 +415,7 @@
|
||||
<ClCompile Include="Network\Event\RequestCreateNewCharacter_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestGetGame_RTA.cpp">
|
||||
<ClCompile Include="Network\Event\RequestDoClientDiscovery_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestCreatePrivateRoom.cpp">
|
||||
@@ -430,9 +454,6 @@
|
||||
<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>
|
||||
@@ -451,7 +472,7 @@
|
||||
<ClCompile Include="Network\Event\NotifyClientDiscovered_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\Request_5F.cpp">
|
||||
<ClCompile Include="Network\Event\RequestUserJoinSuccess.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestSaveCharacter_RTA.cpp">
|
||||
@@ -460,9 +481,30 @@
|
||||
<ClCompile Include="Network\Event\RequestStartGame.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game\RealmCharacterSaveTask.cpp">
|
||||
<Filter>Source Files\Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Game\CharacterSaveManager.cpp">
|
||||
<Filter>Source Files\Game</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\NotifyRoomMessage.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestLeaveRoom.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestSendRoomMessage.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\Event\RequestGetGame_RTA.cpp">
|
||||
<Filter>Source Files\Network\Event</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Network\GenericNetRequest.cpp">
|
||||
<Filter>Source Files\Network</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Norrath Server.rc" />
|
||||
<ResourceCompile Include="Champions Server.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="C:\Users\Adam\Desktop\icon.ico" />
|
||||
@@ -1,6 +1,6 @@
|
||||
// ╔╗╔╔═╗╦═╗╦═╗╔═╗╔╦╗╦ ╦
|
||||
// ║║║║ ║╠╦╝╠╦╝╠═╣ ║ ╠═╣
|
||||
// ╝╚╝╚═╝╩╚═╩╚═╩ ╩ ╩ ╩ ╩
|
||||
// ╔═╗ ╦ ╦ ╔═╗ ╔╦╗ ╔═╗ ╦ ╔═╗ ╔╗╔ ╔═╗
|
||||
// ║ ╠═╣ ╠═╣ ║║║ ╠═╝ ║ ║ ║ ║║║ ╚═╗
|
||||
// ╚═╝ ╩ ╩ ╩ ╩ ╩ ╩ ╩ ╩ ╚═╝ ╝╚╝ ╚═╝
|
||||
// ╔╦╗╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦═╗╦ ╦ ╔═╗╔═╗╦═╗╦ ╦╔═╗╦═╗
|
||||
// ║║║╚═╗║ ║ ║╚╗╔╝║╣ ╠╦╝╚╦╝ ╚═╗║╣ ╠╦╝╚╗╔╝║╣ ╠╦╝
|
||||
// ═╩╝╩╚═╝╚═╝╚═╝ ╚╝ ╚═╝╩╚═ ╩ ╚═╝╚═╝╩╚═ ╚╝ ╚═╝╩╚═
|
||||
@@ -26,45 +26,45 @@ DiscoveryServer::~DiscoveryServer()
|
||||
Log::Info( "Discovery Server stopped." );
|
||||
}
|
||||
|
||||
void DiscoveryServer::Start(std::string ip, int32_t port)
|
||||
void DiscoveryServer::Start( std::string ip, int32_t port )
|
||||
{
|
||||
m_socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
m_socket = socket( AF_INET, SOCK_DGRAM, 0 );
|
||||
|
||||
if (m_socket == INVALID_SOCKET)
|
||||
if( m_socket == INVALID_SOCKET )
|
||||
{
|
||||
Log::Error("Failed to create socket.");
|
||||
Log::Error( "Failed to create socket." );
|
||||
return;
|
||||
}
|
||||
|
||||
sockaddr_in service{};
|
||||
service.sin_family = AF_INET;
|
||||
service.sin_port = htons(port);
|
||||
service.sin_port = htons( port );
|
||||
|
||||
if (ip == "0.0.0.0")
|
||||
if( ip == "0.0.0.0" )
|
||||
{
|
||||
service.sin_addr.s_addr = INADDR_ANY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (InetPtonA(AF_INET, ip.c_str(), &service.sin_addr) != 1)
|
||||
if( InetPtonA( AF_INET, ip.c_str(), &service.sin_addr ) != 1 )
|
||||
{
|
||||
Log::Error("Invalid IP address format: %s", ip.c_str());
|
||||
closesocket(m_socket);
|
||||
Log::Error( "Invalid IP address format: {}", ip );
|
||||
closesocket( m_socket );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (bind(m_socket, reinterpret_cast<SOCKADDR*>(&service), sizeof(service)) == SOCKET_ERROR)
|
||||
if( bind( m_socket, reinterpret_cast< SOCKADDR * >( &service ), sizeof( service ) ) == SOCKET_ERROR )
|
||||
{
|
||||
Log::Error("Failed to bind socket.");
|
||||
closesocket(m_socket);
|
||||
Log::Error( "Failed to bind socket." );
|
||||
closesocket( m_socket );
|
||||
return;
|
||||
}
|
||||
|
||||
m_running = true;
|
||||
m_thread = std::thread(&DiscoveryServer::Run, this);
|
||||
m_thread = std::thread( &DiscoveryServer::Run, this );
|
||||
|
||||
Log::Info("Discovery Server started %s:%d", ip.c_str(), port);
|
||||
Log::Info( "Discovery Server started {}:{}", ip, port );
|
||||
}
|
||||
|
||||
void DiscoveryServer::Stop()
|
||||
@@ -108,25 +108,26 @@ void DiscoveryServer::ProcessPacket( sockaddr_in *clientAddr, sptr_byte_stream s
|
||||
std::memcpy( sessionId.data(), decryptedBytes.data(), 0x20 );
|
||||
|
||||
// Validate the session ID is 16 characters long and not all 0's
|
||||
if (sessionId.size() != 16 || std::all_of(sessionId.begin(), sessionId.end(), [](wchar_t ch) {
|
||||
return ch == L'\0';
|
||||
}))
|
||||
if( sessionId.size() != 16 || std::all_of( sessionId.begin(), sessionId.end(), []( wchar_t ch )
|
||||
{
|
||||
Log::Error("Invalid session id.");
|
||||
return ch == L'\0';
|
||||
} ) )
|
||||
{
|
||||
Log::Error( "Invalid session id." );
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the users remote IP and Port for discovery.
|
||||
char remoteIp[INET_ADDRSTRLEN];
|
||||
InetNtopA(AF_INET, &clientAddr->sin_addr, remoteIp, INET_ADDRSTRLEN);
|
||||
char remoteIp[ INET_ADDRSTRLEN ];
|
||||
InetNtopA( AF_INET, &clientAddr->sin_addr, remoteIp, INET_ADDRSTRLEN );
|
||||
|
||||
uint16_t remotePort = ntohs( clientAddr->sin_port );
|
||||
|
||||
// Find the user associated with the session ID
|
||||
auto user = RealmUserManager::Get().FindUserBySessionId( sessionId );
|
||||
auto user = UserManager::Get().FindUserBySessionId( sessionId );
|
||||
if( user == nullptr )
|
||||
{
|
||||
Log::Error( "User not found! [%S]", sessionId.c_str() );
|
||||
Log::Error( "User not found! [{}]", sessionId );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -140,7 +141,7 @@ void DiscoveryServer::ProcessPacket( sockaddr_in *clientAddr, sptr_byte_stream s
|
||||
user->m_discoveryAddr = remoteIp;
|
||||
user->m_discoveryPort = remotePort;
|
||||
|
||||
Log::Debug("Discovery Handshake from %s:%d", remoteIp, remotePort);
|
||||
Log::Debug( "Discovery Handshake from {}:{}", remoteIp, remotePort );
|
||||
|
||||
if( user->m_isHost )
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ╔╗╔╔═╗╦═╗╦═╗╔═╗╔╦╗╦ ╦
|
||||
// ║║║║ ║╠╦╝╠╦╝╠═╣ ║ ╠═╣
|
||||
// ╝╚╝╚═╝╩╚═╩╚═╩ ╩ ╩ ╩ ╩
|
||||
// ╔═╗ ╦ ╦ ╔═╗ ╔╦╗ ╔═╗ ╦ ╔═╗ ╔╗╔ ╔═╗
|
||||
// ║ ╠═╣ ╠═╣ ║║║ ╠═╝ ║ ║ ║ ║║║ ╚═╗
|
||||
// ╚═╝ ╩ ╩ ╩ ╩ ╩ ╩ ╩ ╩ ╚═╝ ╝╚╝ ╚═╝
|
||||
// ╦ ╔═╗╔╗ ╔╗ ╦ ╦ ╔═╗╔═╗╦═╗╦ ╦╔═╗╦═╗
|
||||
// ║ ║ ║╠╩╗╠╩╗╚╦╝ ╚═╗║╣ ╠╦╝╚╗╔╝║╣ ╠╦╝
|
||||
// ╩═╝╚═╝╚═╝╚═╝ ╩ ╚═╝╚═╝╩╚═ ╚╝ ╚═╝╩╚═
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "../Game/RealmUserManager.h"
|
||||
#include "../Network/Events.h"
|
||||
#include "../Network/Event/NotifyForcedLogout.h"
|
||||
#include "../../logging.h"
|
||||
|
||||
LobbyServer::LobbyServer()
|
||||
@@ -80,6 +81,13 @@ void LobbyServer::Start( std::string ip )
|
||||
|
||||
void LobbyServer::Stop()
|
||||
{
|
||||
Log::Info( "Stopping Lobby Server..." );
|
||||
|
||||
for( auto &client : m_clientSockets )
|
||||
{
|
||||
client->send( NotifyForcedLogout() );
|
||||
}
|
||||
|
||||
m_running = false;
|
||||
if( m_thread.joinable() )
|
||||
{
|
||||
@@ -92,7 +100,7 @@ SOCKET LobbyServer::OpenNetworkSocket( std::string ip, int32_t port )
|
||||
SOCKET sock = ::WSASocket( AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, WSA_FLAG_OVERLAPPED );
|
||||
if( sock == INVALID_SOCKET )
|
||||
{
|
||||
Log::Error( "WSASocket() failed on port %u", port );
|
||||
Log::Error( "WSASocket() failed on port {}", port );
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
@@ -104,31 +112,28 @@ SOCKET LobbyServer::OpenNetworkSocket( std::string ip, int32_t port )
|
||||
{
|
||||
service.sin_addr.s_addr = INADDR_ANY;
|
||||
}
|
||||
else
|
||||
else if( InetPtonA( AF_INET, ip.c_str(), &service.sin_addr) != 1 )
|
||||
{
|
||||
if( InetPtonA( AF_INET, ip.c_str(), &service.sin_addr ) != 1 )
|
||||
{
|
||||
Log::Error( "Invalid IP address format: %s", ip.c_str() );
|
||||
Log::Error( "Invalid IP address format: {}", ip );
|
||||
closesocket( sock );
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
|
||||
if( bind( sock, reinterpret_cast< SOCKADDR * >( &service ), sizeof( service ) ) == SOCKET_ERROR )
|
||||
{
|
||||
Log::Error( "bind() failed on port %u", port );
|
||||
Log::Error( "bind() failed on port {}", port );
|
||||
closesocket( sock );
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
if( listen( sock, SOMAXCONN ) == SOCKET_ERROR )
|
||||
{
|
||||
Log::Error( "listen() failed on port %u", port );
|
||||
Log::Error( "listen() failed on port {}", port );
|
||||
closesocket( sock );
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
Log::Info( "Socket Opened on %s:%d", ip.c_str(), port );
|
||||
Log::Info( "Socket Opened on {}:{}", ip, port );
|
||||
|
||||
return sock;
|
||||
}
|
||||
@@ -148,7 +153,7 @@ void LobbyServer::Run()
|
||||
FD_SET( m_conSocket, &readSet );
|
||||
FD_SET( m_rtaSocket, &readSet );
|
||||
|
||||
for( auto &sock : m_conGatewaySocket )
|
||||
for( const auto &sock : m_conGatewaySocket )
|
||||
{
|
||||
if( sock != INVALID_SOCKET )
|
||||
{
|
||||
@@ -156,7 +161,7 @@ void LobbyServer::Run()
|
||||
}
|
||||
}
|
||||
|
||||
for( auto &sock : m_rtaGatewaySocket )
|
||||
for( const auto &sock : m_rtaGatewaySocket )
|
||||
{
|
||||
if( sock != INVALID_SOCKET )
|
||||
{
|
||||
@@ -234,7 +239,7 @@ void LobbyServer::CheckSocketProblem()
|
||||
if( elapsed.count() > 30 )
|
||||
{
|
||||
socket->flag.disconnected_forced = true;
|
||||
Log::Info( "[LOBBY] Client Timeout : (%s)", socket->remote_ip.c_str() );
|
||||
Log::Info( "[LOBBY] Client Timeout : ({})", socket->remote_ip );
|
||||
}
|
||||
|
||||
// Check if we're waiting to disconnect after sending buffered data
|
||||
@@ -245,8 +250,8 @@ void LobbyServer::CheckSocketProblem()
|
||||
|
||||
if( socket->flag.disconnected_forced )
|
||||
{
|
||||
RealmUserManager::Get().RemoveUser( socket );
|
||||
Log::Info( "[LOBBY] Client Disconnected : (%s)", socket->remote_ip.c_str() );
|
||||
UserManager::Get().RemoveUser( socket );
|
||||
Log::Info( "[LOBBY] Client Disconnected : ({})", socket->remote_ip );
|
||||
it = m_clientSockets.erase( it );
|
||||
}
|
||||
else
|
||||
@@ -271,12 +276,12 @@ void LobbyServer::AcceptGateway( SOCKET socket, RealmGameType gameType )
|
||||
auto new_socket = std::make_shared< RealmSocket >();
|
||||
new_socket->fd = clientSocket;
|
||||
new_socket->remote_addr = clientInfo;
|
||||
new_socket->remote_ip = inet_ntoa( clientInfo.sin_addr );
|
||||
new_socket->remote_ip = Util::IPFromAddr( clientInfo );
|
||||
new_socket->remote_port = ntohs( clientInfo.sin_port );
|
||||
new_socket->gameType = gameType;
|
||||
m_clientSockets.push_back( new_socket );
|
||||
|
||||
Log::Info( "New Gateway Client Connected : (%s)", new_socket->remote_ip.c_str() );
|
||||
Log::Info( "New Gateway Client Connected : ({})", new_socket->remote_ip );
|
||||
}
|
||||
|
||||
void LobbyServer::AcceptClient( SOCKET socket, RealmGameType gameType )
|
||||
@@ -294,19 +299,19 @@ void LobbyServer::AcceptClient( SOCKET socket, RealmGameType gameType )
|
||||
auto new_socket = std::make_shared< RealmSocket >();
|
||||
new_socket->fd = clientSocket;
|
||||
new_socket->remote_addr = clientInfo;
|
||||
new_socket->remote_ip = inet_ntoa( clientInfo.sin_addr );
|
||||
new_socket->remote_ip = Util::IPFromAddr( clientInfo );
|
||||
new_socket->remote_port = ntohs( clientInfo.sin_port );
|
||||
new_socket->gameType = gameType;
|
||||
m_clientSockets.push_back( new_socket );
|
||||
|
||||
RealmUserManager::Get().CreateUser( new_socket, gameType );
|
||||
UserManager::Get().CreateUser( new_socket, gameType );
|
||||
|
||||
Log::Info( "New Client Connected : (%s)", new_socket->remote_ip.c_str() );
|
||||
Log::Info( "New Client Connected : ({})", new_socket->remote_ip );
|
||||
}
|
||||
|
||||
void LobbyServer::ReadSocket( sptr_socket socket )
|
||||
{
|
||||
if( socket->flag.disconnected_wait )
|
||||
if( socket->flag.disconnected_forced )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -315,14 +320,14 @@ void LobbyServer::ReadSocket( sptr_socket socket )
|
||||
|
||||
if( bytesReceived == SOCKET_ERROR )
|
||||
{
|
||||
Log::Info( "Socket Error [%d].", WSAGetLastError() );
|
||||
socket->flag.disconnected_wait = true;
|
||||
Log::Info( "Socket Error [{}].", WSAGetLastError() );
|
||||
socket->flag.disconnected_forced = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if( bytesReceived == 0 )
|
||||
{
|
||||
socket->flag.disconnected_wait = true;
|
||||
socket->flag.disconnected_forced = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,7 +347,7 @@ void LobbyServer::ReadSocket( sptr_socket socket )
|
||||
|
||||
if( packetSize <= 0 || packetSize > 2048 )
|
||||
{
|
||||
Log::Error( "Invalid packet size: %d. Disconnecting client.", packetSize );
|
||||
Log::Error( "Invalid packet size: {}. Disconnecting client.", packetSize );
|
||||
socket->flag.disconnected_wait = true;
|
||||
break;
|
||||
}
|
||||
@@ -369,7 +374,7 @@ void LobbyServer::ReadSocket( sptr_socket socket )
|
||||
|
||||
void LobbyServer::WriteSocket( sptr_socket socket )
|
||||
{
|
||||
if( socket->flag.disconnected_wait || socket->m_pendingWriteBuffer.empty() )
|
||||
if( socket->flag.disconnected_forced || socket->m_pendingWriteBuffer.empty() )
|
||||
return;
|
||||
|
||||
socket->last_send_time = std::chrono::steady_clock::now();
|
||||
@@ -395,7 +400,7 @@ void LobbyServer::WriteSocket( sptr_socket socket )
|
||||
if( err == WSAEWOULDBLOCK )
|
||||
break;
|
||||
|
||||
Log::Error( "Send failed: %d", err );
|
||||
Log::Error( "Send failed: {}", err );
|
||||
socket->flag.disconnected_wait = true;
|
||||
return;
|
||||
}
|
||||
@@ -427,14 +432,14 @@ void LobbyServer::HandleRequest( sptr_socket socket, sptr_byte_stream stream )
|
||||
auto packetId = stream->read< uint16_t >();
|
||||
stream->set_position( 0 );
|
||||
|
||||
Log::Debug( "Event Request %04X", packetId );
|
||||
//Log::Debug( "Event Request {}", packetId );
|
||||
|
||||
//Log::Packet( stream->m_buffer, stream->m_buffer.size(), false );
|
||||
|
||||
auto it = REQUEST_EVENT.find( packetId );
|
||||
if( it == REQUEST_EVENT.end() )
|
||||
{
|
||||
Log::Error( "[LOBBY] Unknown packet id : 0x%04X", packetId );
|
||||
Log::Error( "[LOBBY] Unknown packet id : {}", packetId );
|
||||
Log::Packet( stream->m_buffer, stream->m_buffer.size(), false );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <string>
|
||||
#include <array>
|
||||
|
||||
//#define FD_SETSIZE 512
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)bin</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)bin</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)bin</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user