From 50ac686b7f14d3b84a280e2e801f92a290280bcc Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 4 Aug 2023 22:20:38 -0500 Subject: [PATCH] rename enum cause windows is already named that --- dNet/AuthPackets.cpp | 21 +-------------------- dNet/AuthPackets.h | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/dNet/AuthPackets.cpp b/dNet/AuthPackets.cpp index ca85cc82..4b93c022 100644 --- a/dNet/AuthPackets.cpp +++ b/dNet/AuthPackets.cpp @@ -29,25 +29,6 @@ #include "eMasterMessageType.h" #include "eStamps.h" -enum class ClientOS : uint8_t { - UNKNOWN, - WINDOWS, - MACOS -}; - -enum class LCID : uint16_t { - en_US = 0x0409, - de_DE = 0x0407, - en_GB = 0x0809 -}; - -enum class Language : uint32_t { - en_US, - pl_US, - de_DE, - en_GB, -}; - void Stamp::Serialize(RakNet::BitStream* outBitStream){ outBitStream->Write(type); outBitStream->Write(value); @@ -109,7 +90,7 @@ void AuthPackets::HandleLoginRequest(dServer* server, Packet* packet) { LUWString password(41); inStream.Read(password); - LCID locale_id; + LanguageCodeID locale_id; inStream.Read(locale_id); Game::logger->Log("AuthPackets", "Locale ID: %i", locale_id); diff --git a/dNet/AuthPackets.h b/dNet/AuthPackets.h index e98b88a7..df555e61 100644 --- a/dNet/AuthPackets.h +++ b/dNet/AuthPackets.h @@ -24,10 +24,28 @@ struct Stamp { void Serialize(RakNet::BitStream* outBitStream); }; +enum class ClientOS : uint8_t { + UNKNOWN, + WINDOWS, + MACOS +}; + +enum class LanguageCodeID : uint16_t { + en_US = 0x0409, + de_DE = 0x0407, + en_GB = 0x0809 +}; + +enum class Language : uint32_t { + en_US, + pl_US, + de_DE, + en_GB, +}; + namespace AuthPackets { void HandleHandshake(dServer* server, Packet* packet); void SendHandshake(dServer* server, const SystemAddress& sysAddr, const std::string& nextServerIP, uint16_t nextServerPort, const ServerType serverType); - void HandleLoginRequest(dServer* server, Packet* packet); void SendLoginResponse(dServer* server, const SystemAddress& sysAddr, eLoginResponse responseCode, const std::string& errorMsg, const std::string& wServerIP, uint16_t wServerPort, std::string username); }