Simplification of discovery events
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#include "NotifyGameDiscovered.h"
|
||||
#include "../../Game/RealmUser.h"
|
||||
|
||||
NotifyGameDiscovered::NotifyGameDiscovered( std::string clientIp, int32_t clientPort, RealmGameType clientType ) : GenericMessage( 0x3E )
|
||||
NotifyGameDiscovered::NotifyGameDiscovered( sptr_user user ) : GenericMessage( 0x3E )
|
||||
{
|
||||
this->m_clientIp = std::move( clientIp );
|
||||
this->m_clientPort = clientPort;
|
||||
this->m_clientType = clientType;
|
||||
this->m_clientIp = user->m_discoveryAddr;
|
||||
this->m_clientPort = user->m_discoveryPort;
|
||||
this->m_clientType = user->m_gameType;
|
||||
}
|
||||
|
||||
void NotifyGameDiscovered::Serialize( ByteBuffer &out ) const
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "../GenericNetMessage.h"
|
||||
#include "../../Common/Constant.h"
|
||||
#include "../../Common/ForwardDecl.h"
|
||||
|
||||
class NotifyGameDiscovered : public GenericMessage {
|
||||
private:
|
||||
@@ -13,6 +14,6 @@ private:
|
||||
RealmGameType m_clientType;
|
||||
|
||||
public:
|
||||
NotifyGameDiscovered( std::string clientIp, int32_t clientPort, RealmGameType clientType );
|
||||
NotifyGameDiscovered( sptr_user user );
|
||||
void Serialize(ByteBuffer &out) const override;
|
||||
};
|
||||
Reference in New Issue
Block a user