mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
Breakout ServerDisconnectIdentifiers into an enum (#995)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "Game.h"
|
||||
#include "dConfig.h"
|
||||
#include "eServerDisconnectIdentifiers.h"
|
||||
|
||||
void AuthPackets::HandleHandshake(dServer* server, Packet* packet) {
|
||||
RakNet::BitStream inStream(packet->data, packet->length, false);
|
||||
|
@@ -164,7 +164,7 @@ void dServer::SendToMaster(RakNet::BitStream* bitStream) {
|
||||
mMasterPeer->Send(bitStream, SYSTEM_PRIORITY, RELIABLE_ORDERED, 0, mMasterSystemAddress, false);
|
||||
}
|
||||
|
||||
void dServer::Disconnect(const SystemAddress& sysAddr, uint32_t disconNotifyID) {
|
||||
void dServer::Disconnect(const SystemAddress& sysAddr, eServerDisconnectIdentifiers disconNotifyID) {
|
||||
RakNet::BitStream bitStream;
|
||||
PacketUtils::WriteHeader(bitStream, SERVER, MSG_SERVER_DISCONNECT_NOTIFY);
|
||||
bitStream.Write(disconNotifyID);
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
class dLogger;
|
||||
class dConfig;
|
||||
enum class eServerDisconnectIdentifiers : uint32_t;
|
||||
|
||||
enum class ServerType : uint32_t {
|
||||
Master,
|
||||
@@ -41,7 +42,7 @@ public:
|
||||
virtual void Send(RakNet::BitStream* bitStream, const SystemAddress& sysAddr, bool broadcast);
|
||||
void SendToMaster(RakNet::BitStream* bitStream);
|
||||
|
||||
void Disconnect(const SystemAddress& sysAddr, uint32_t disconNotifyID);
|
||||
void Disconnect(const SystemAddress& sysAddr, eServerDisconnectIdentifiers disconNotifyID);
|
||||
|
||||
bool IsConnected(const SystemAddress& sysAddr);
|
||||
const std::string& GetIP() const { return mIP; }
|
||||
|
Reference in New Issue
Block a user