Horizon Official Technical Documentation
Horizon::Char::CH_ENTER Class Reference

Main object for the aegis packet: CH_ENTER. More...

#include <HandledPackets.hpp>

+ Inheritance diagram for Horizon::Char::CH_ENTER:
+ Collaboration diagram for Horizon::Char::CH_ENTER:

Public Member Functions

 CH_ENTER (std::shared_ptr< CharSession > s)
 
virtual ~CH_ENTER ()
 
void handle (ByteBuffer &&buf)
 CH_ENTER. More...
 
void deserialize (ByteBuffer &buf)
 
- Public Member Functions inherited from Horizon::Base::NetworkPacket< CharSession >
 NetworkPacket (uint16_t packet_id, std::shared_ptr< CharSession > s)
 
virtual ~NetworkPacket ()
 
void set_packet_id (uint16_t id)
 
uint16_t get_packet_id ()
 
ByteBufferbuf ()
 
std::shared_ptr< CharSession > get_session ()
 Retrieves the session from this handler instance. More...
 
virtual void handle (ByteBuffer &&buf)
 
virtual void deserialize (ByteBuffer &buf)
 
void transmit ()
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 
void transmit (std::size_t size)
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 

Public Attributes

uint32_t _account_id { 0 }
 
uint32_t _auth_code { 0 }
 
uint32_t _account_level { 0 }
 
uint16_t _unknown { 0 }
 
uint8_t _gender { 0 }
 

Additional Inherited Members

- Protected Attributes inherited from Horizon::Base::NetworkPacket< CharSession >
ByteBuffer _buffer
 Buffer storage facility for the packet stream. More...
 
uint16_t _packet_id
 ID of the network packet. More...
 

Detailed Description

Main object for the aegis packet: CH_ENTER.

Constructor & Destructor Documentation

◆ CH_ENTER()

Horizon::Char::CH_ENTER::CH_ENTER ( std::shared_ptr< CharSession s)
inline
473 : NetworkPacket<CharSession>(ID_CH_ENTER, s)
474 {}
@ ID_CH_ENTER
Definition: HandledPackets.hpp:451

◆ ~CH_ENTER()

virtual Horizon::Char::CH_ENTER::~CH_ENTER ( )
inlinevirtual
475{}

Member Function Documentation

◆ deserialize()

void CH_ENTER::deserialize ( ByteBuffer buf)
virtual

Reimplemented from Horizon::Base::NetworkPacket< CharSession >.

72{
73 buf >> _packet_id;
75 buf >> _auth_code;
77 buf >> _unknown;
78 buf >> _gender;
79}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
uint32_t _account_id
Definition: HandledPackets.hpp:482
uint32_t _account_level
Definition: HandledPackets.hpp:484
uint16_t _unknown
Definition: HandledPackets.hpp:485
uint32_t _auth_code
Definition: HandledPackets.hpp:483
uint8_t _gender
Definition: HandledPackets.hpp:486

References _account_id, _account_level, _auth_code, _gender, Horizon::Base::NetworkPacket< CharSession >::_packet_id, _unknown, and Horizon::Base::NetworkPacket< CharSession >::buf().

Referenced by handle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle()

void CH_ENTER::handle ( ByteBuffer &&  buf)
virtual

CH_ENTER.

Reimplemented from Horizon::Base::NetworkPacket< CharSession >.

66{
68 get_session()->clif()->authorize_new_connection(_account_id, _auth_code, _account_level, _gender);
69}
std::shared_ptr< CharSession > get_session()
Retrieves the session from this handler instance.
Definition: NetworkPacket.hpp:65
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:71

References _account_id, _account_level, _auth_code, _gender, Horizon::Base::NetworkPacket< CharSession >::buf(), deserialize(), and Horizon::Base::NetworkPacket< CharSession >::get_session().

+ Here is the call graph for this function:

Member Data Documentation

◆ _account_id

uint32_t Horizon::Char::CH_ENTER::_account_id { 0 }

Referenced by deserialize(), and handle().

◆ _account_level

uint32_t Horizon::Char::CH_ENTER::_account_level { 0 }

Referenced by deserialize(), and handle().

◆ _auth_code

uint32_t Horizon::Char::CH_ENTER::_auth_code { 0 }

Referenced by deserialize(), and handle().

◆ _gender

uint8_t Horizon::Char::CH_ENTER::_gender { 0 }

Referenced by deserialize(), and handle().

◆ _unknown

uint16_t Horizon::Char::CH_ENTER::_unknown { 0 }

Referenced by deserialize().


The documentation for this class was generated from the following files: