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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 HC_DELETE_CHAR3_CANCEL (std::shared_ptr< CharSession > s)
 
virtual ~HC_DELETE_CHAR3_CANCEL ()
 
void deliver (uint32_t char_id, hc_delete_cancel_result result)
 HC_DELETE_CHAR3_CANCEL. 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 }
 
hc_delete_cancel_result _result { 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: HC_DELETE_CHAR3_CANCEL.

Constructor & Destructor Documentation

◆ HC_DELETE_CHAR3_CANCEL()

Horizon::Char::HC_DELETE_CHAR3_CANCEL::HC_DELETE_CHAR3_CANCEL ( std::shared_ptr< CharSession s)
inline
671 : NetworkPacket<CharSession>(ID_HC_DELETE_CHAR3_CANCEL, s)
672 {}
@ ID_HC_DELETE_CHAR3_CANCEL
Definition: TransmittedPackets.hpp:652

◆ ~HC_DELETE_CHAR3_CANCEL()

virtual Horizon::Char::HC_DELETE_CHAR3_CANCEL::~HC_DELETE_CHAR3_CANCEL ( )
inlinevirtual
673{}

Member Function Documentation

◆ deliver()

void HC_DELETE_CHAR3_CANCEL::deliver ( uint32_t  char_id,
hc_delete_cancel_result  result 
)

HC_DELETE_CHAR3_CANCEL.

446{
447 _character_id = char_id;
448 _result = result;
449
450 serialize();
451 transmit();
452}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
hc_delete_cancel_result _result
Definition: TransmittedPackets.hpp:680
uint32_t _character_id
Definition: TransmittedPackets.hpp:679
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:454

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

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

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

◆ serialize()

ByteBuffer & HC_DELETE_CHAR3_CANCEL::serialize ( )
455{
456 buf() << _packet_id;
457 buf() << _character_id;
458 buf() << (int)_result;
459 return buf();
460}
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_CANCEL::_character_id { 0 }

Referenced by deliver(), and serialize().

◆ _result

hc_delete_cancel_result Horizon::Char::HC_DELETE_CHAR3_CANCEL::_result { 0 }

Referenced by deliver(), and serialize().


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