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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_MSG_STATE_CHANGE (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_MSG_STATE_CHANGE ()
 
void deliver (int16_t status_index, int32_t guid, int8_t state)
 ZC_MSG_STATE_CHANGE. 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 _status_index {0}
 
int32_t _guid {0}
 
int8_t _state {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_MSG_STATE_CHANGE.

Constructor & Destructor Documentation

◆ ZC_MSG_STATE_CHANGE()

Horizon::Zone::ZC_MSG_STATE_CHANGE::ZC_MSG_STATE_CHANGE ( std::shared_ptr< ZoneSession s)
inline
31361 : NetworkPacket<ZoneSession>(ID_ZC_MSG_STATE_CHANGE, s)
31362 {}
@ ID_ZC_MSG_STATE_CHANGE
Definition: TransmittedPackets.hpp:31334

◆ ~ZC_MSG_STATE_CHANGE()

virtual Horizon::Zone::ZC_MSG_STATE_CHANGE::~ZC_MSG_STATE_CHANGE ( )
inlinevirtual
31363{}

Member Function Documentation

◆ deliver()

void ZC_MSG_STATE_CHANGE::deliver ( int16_t  status_index,
int32_t  guid,
int8_t  state 
)

ZC_MSG_STATE_CHANGE.

1781{
1782 _status_index = status_index;
1783 _guid = guid;
1784 _state = state;
1785
1786 serialize();
1787 transmit();
1788}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
int8_t _state
Definition: TransmittedPackets.hpp:31371
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:1790
int32_t _guid
Definition: TransmittedPackets.hpp:31370
int16_t _status_index
Definition: TransmittedPackets.hpp:31369

References _guid, _state, _status_index, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

Referenced by Horizon::Zone::ZoneClientInterface::notify_status_change_end().

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

◆ serialize()

ByteBuffer & ZC_MSG_STATE_CHANGE::serialize ( )
1791{
1792 buf() << _packet_id;
1793 buf() << _status_index;
1794 buf() << _guid;
1795 buf() << _state;
1796 return buf();
1797}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59

References _guid, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _state, _status_index, 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

◆ _guid

int32_t Horizon::Zone::ZC_MSG_STATE_CHANGE::_guid {0}

Referenced by deliver(), and serialize().

◆ _state

int8_t Horizon::Zone::ZC_MSG_STATE_CHANGE::_state {0}

Referenced by deliver(), and serialize().

◆ _status_index

int16_t Horizon::Zone::ZC_MSG_STATE_CHANGE::_status_index {0}

Referenced by deliver(), and serialize().


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