Horizon Official Technical Documentation
Horizon::Zone::ZC_RECOVERY2 Class Reference

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

#include <TransmittedPackets.hpp>

+ Inheritance diagram for Horizon::Zone::ZC_RECOVERY2:
+ Collaboration diagram for Horizon::Zone::ZC_RECOVERY2:

Public Member Functions

 ZC_RECOVERY2 (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_RECOVERY2 ()
 
void deliver (int16_t type, int32_t amount)
 ZC_RECOVERY2. More...
 
ByteBufferserialize ()
 
- Public Member Functions inherited from Horizon::Base::NetworkPacket< ZoneSession >
 NetworkPacket (uint16_t packet_id, std::shared_ptr< ZoneSession > s)
 
virtual ~NetworkPacket ()
 
void set_packet_id (uint16_t id)
 
uint16_t get_packet_id ()
 
ByteBufferbuf ()
 
std::shared_ptr< ZoneSession > 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

int16_t _type {0}
 
int32_t _amount {0}
 

Additional Inherited Members

- Protected Attributes inherited from Horizon::Base::NetworkPacket< ZoneSession >
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: ZC_RECOVERY2.

Constructor & Destructor Documentation

◆ ZC_RECOVERY2()

Horizon::Zone::ZC_RECOVERY2::ZC_RECOVERY2 ( std::shared_ptr< ZoneSession s)
inline
39615 : NetworkPacket<ZoneSession>(ID_ZC_RECOVERY2, s)
39616 {}
@ ID_ZC_RECOVERY2
Definition: TransmittedPackets.hpp:39591

◆ ~ZC_RECOVERY2()

virtual Horizon::Zone::ZC_RECOVERY2::~ZC_RECOVERY2 ( )
inlinevirtual
39617{}

Member Function Documentation

◆ deliver()

void ZC_RECOVERY2::deliver ( int16_t  type,
int32_t  amount 
)

ZC_RECOVERY2.

6019{
6020 _type = type;
6021 _amount = amount;
6022
6023 serialize();
6024 transmit();
6025}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
int32_t _amount
Definition: TransmittedPackets.hpp:39624
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:6026
int16_t _type
Definition: TransmittedPackets.hpp:39623

References _amount, _type, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

+ Here is the call graph for this function:

◆ serialize()

ByteBuffer & ZC_RECOVERY2::serialize ( )
6027{
6028 buf() << _packet_id;
6029 buf() << _type;
6030 buf() << _amount;
6031 return buf();
6032}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59

References _amount, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _type, and Horizon::Base::NetworkPacket< ZoneSession >::buf().

Referenced by deliver().

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

Member Data Documentation

◆ _amount

int32_t Horizon::Zone::ZC_RECOVERY2::_amount {0}

Referenced by deliver(), and serialize().

◆ _type

int16_t Horizon::Zone::ZC_RECOVERY2::_type {0}

Referenced by deliver(), and serialize().


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