2017-08-08 13:53:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef _CLoginSession_H_
|
|
|
|
#define _CLoginSession_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string>
|
|
|
|
#include <string.h>
|
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
namespace Sapphire
|
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 LoginSession
|
|
|
|
{
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
private:
|
2019-03-11 22:48:33 +01:00
|
|
|
uint32_t m_ip;
|
|
|
|
uint32_t m_accountId;
|
2018-10-28 21:53:21 +01:00
|
|
|
uint8_t m_sessionId[56];
|
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
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
LoginSession( void );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
~LoginSession( void );
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-03-11 22:48:33 +01:00
|
|
|
uint32_t getIp()
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
2019-03-11 22:48:33 +01:00
|
|
|
return m_ip;
|
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 setSessionId( uint8_t* sessionId )
|
|
|
|
{
|
|
|
|
memcpy( m_sessionId, sessionId, 56 );
|
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-03-11 22:48:33 +01:00
|
|
|
void setIp( uint32_t ip )
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
2019-03-11 22:48:33 +01:00
|
|
|
m_ip = ip;
|
2018-10-28 21:53:21 +01:00
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-03-11 22:48:33 +01:00
|
|
|
uint32_t getAccountId()
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
2019-03-11 22:48:33 +01:00
|
|
|
return m_accountId;
|
2018-10-28 21:53:21 +01:00
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2019-03-11 22:48:33 +01:00
|
|
|
void setAccountId( uint32_t id )
|
2018-10-28 21:53:21 +01:00
|
|
|
{
|
2019-03-11 22:48:33 +01:00
|
|
|
m_accountId = id;
|
2018-10-28 21:53:21 +01:00
|
|
|
}
|
2017-08-08 13:53:47 +02:00
|
|
|
|
2018-10-28 21:53:21 +01:00
|
|
|
};
|
2017-08-08 13:53:47 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|