2017-08-08 13:53:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef _CLobbySession_H_
|
|
|
|
#define _CLobbySession_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string>
|
|
|
|
#include <string.h>
|
|
|
|
|
2019-06-02 23:28:19 +10:00
|
|
|
namespace Sapphire::Lobby
|
2018-08-29 21:40:59 +02:00
|
|
|
{
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
class LobbySession
|
|
|
|
{
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
private:
|
|
|
|
uint32_t m_IP;
|
|
|
|
uint32_t m_accountID;
|
2021-11-27 00:53:57 +01:00
|
|
|
char m_sessionId[ 64 ];
|
|
|
|
uint8_t m_charaIndex;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
public:
|
|
|
|
std::string newCharName;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2021-11-27 00:53:57 +01:00
|
|
|
LobbySession() = default;
|
|
|
|
~LobbySession() = default;
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t getIP()
|
|
|
|
{
|
|
|
|
return m_IP;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2021-11-27 00:53:57 +01:00
|
|
|
char* getSessionId()
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
|
|
|
return m_sessionId;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2021-11-27 00:53:57 +01:00
|
|
|
void setSessionId( char* sessionId )
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
2021-11-27 00:53:57 +01:00
|
|
|
memcpy( m_sessionId, sessionId, sizeof( m_sessionId ) );
|
2018-10-28 21:53:21 +01:00
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setIP( uint32_t iP )
|
|
|
|
{
|
|
|
|
m_IP = iP;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
uint32_t getAccountID()
|
|
|
|
{
|
|
|
|
return m_accountID;
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
void setAccountID( uint32_t iD )
|
|
|
|
{
|
|
|
|
m_accountID = iD;
|
|
|
|
}
|
2021-11-27 00:53:57 +01:00
|
|
|
void setCharaIndex( uint8_t index )
|
|
|
|
{
|
|
|
|
m_charaIndex = index;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t getCharaIndex()
|
|
|
|
{
|
|
|
|
return m_charaIndex;
|
|
|
|
}
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|