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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 HC_DELETE_CHAR3 (std::shared_ptr< CharSession > s)
 
virtual ~HC_DELETE_CHAR3 ()
 
void deliver (uint32_t char_id, character_delete_accept_result result)
 HC_DELETE_CHAR3. More...
 
ByteBufferserialize ()
 
- 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 _character_id { 0 }
 
character_delete_accept_result _result { CHAR_DEL_ACCEPT_RESULT_SUCCESS }
 

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: HC_DELETE_CHAR3.

Constructor & Destructor Documentation

◆ HC_DELETE_CHAR3()

Horizon::Char::HC_DELETE_CHAR3::HC_DELETE_CHAR3 ( std::shared_ptr< CharSession s)
inline
633 : NetworkPacket<CharSession>(ID_HC_DELETE_CHAR3, s)
634 {}
@ ID_HC_DELETE_CHAR3
Definition: TransmittedPackets.hpp:614

◆ ~HC_DELETE_CHAR3()

virtual Horizon::Char::HC_DELETE_CHAR3::~HC_DELETE_CHAR3 ( )
inlinevirtual
635{}

Member Function Documentation

◆ deliver()

void HC_DELETE_CHAR3::deliver ( uint32_t  char_id,
character_delete_accept_result  result 
)

HC_DELETE_CHAR3.

397{
398 _character_id = char_id;
399 _result = result;
400
401 serialize();
402 transmit();
403}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
character_delete_accept_result _result
Definition: TransmittedPackets.hpp:642
uint32_t _character_id
Definition: TransmittedPackets.hpp:641
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:405

References _character_id, _result, serialize(), and Horizon::Base::NetworkPacket< CharSession >::transmit().

Referenced by Horizon::Char::CharClientInterface::character_delete_birthdate().

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

◆ serialize()

ByteBuffer & HC_DELETE_CHAR3::serialize ( )
406{
407 buf() << _packet_id;
408 buf() << _character_id;
409 buf() << _result;
410 return buf();
411}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59

References _character_id, Horizon::Base::NetworkPacket< CharSession >::_packet_id, _result, and Horizon::Base::NetworkPacket< CharSession >::buf().

Referenced by deliver().

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

Member Data Documentation

◆ _character_id

uint32_t Horizon::Char::HC_DELETE_CHAR3::_character_id { 0 }

Referenced by deliver(), and serialize().

◆ _result

character_delete_accept_result Horizon::Char::HC_DELETE_CHAR3::_result { CHAR_DEL_ACCEPT_RESULT_SUCCESS }

Referenced by deliver(), and serialize().


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