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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_NOTIFY_ACT (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_NOTIFY_ACT ()
 
void deliver (int8_t action)
 ZC_NOTIFY_ACT. More...
 
void deliver (int32_t target_guid, int8_t action)
 
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

int32_t _target_guid { 0 }
 
int8_t _unused_bytes [20]
 
int8_t _action_type {2}
 
int8_t _unused_bytes2 [2]
 

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_NOTIFY_ACT.

Constructor & Destructor Documentation

◆ ZC_NOTIFY_ACT()

Horizon::Zone::ZC_NOTIFY_ACT::ZC_NOTIFY_ACT ( std::shared_ptr< ZoneSession s)
inline
31944 : NetworkPacket<ZoneSession>(ID_ZC_NOTIFY_ACT, s)
31945 {}
@ ID_ZC_NOTIFY_ACT
Definition: TransmittedPackets.hpp:31917

◆ ~ZC_NOTIFY_ACT()

virtual Horizon::Zone::ZC_NOTIFY_ACT::~ZC_NOTIFY_ACT ( )
inlinevirtual
31946{}

Member Function Documentation

◆ deliver() [1/2]

void ZC_NOTIFY_ACT::deliver ( int32_t  target_guid,
int8_t  action 
)
1873{
1874 _action_type = action;
1875 _target_guid = target_guid;
1876
1877 serialize();
1878 transmit();
1879}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:1881
int8_t _action_type
Definition: TransmittedPackets.hpp:31955
int32_t _target_guid
Definition: TransmittedPackets.hpp:31953

References _action_type, _target_guid, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

+ Here is the call graph for this function:

◆ deliver() [2/2]

void ZC_NOTIFY_ACT::deliver ( int8_t  action)

ZC_NOTIFY_ACT.

1865{
1866 _action_type = action;
1867
1868 serialize();
1869 transmit();
1870}

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

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

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

◆ serialize()

ByteBuffer & ZC_NOTIFY_ACT::serialize ( )
1882{
1883 buf() << _packet_id;
1884 buf() << get_session()->player()->guid();
1885 if (_target_guid != 0) {
1886 char unused_bytes[16]{0};
1887 buf() << _target_guid;
1888 buf().append(unused_bytes, sizeof(unused_bytes));
1889 } else {
1890 buf().append(_unused_bytes, 20);
1891 }
1892 buf() << _action_type;
1894
1895 return buf();
1896}
void append(T value)
Definition: ByteBuffer.hpp:140
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
std::shared_ptr< ZoneSession > get_session()
Retrieves the session from this handler instance.
Definition: NetworkPacket.hpp:65
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
int8_t _unused_bytes2[2]
Definition: TransmittedPackets.hpp:31956
int8_t _unused_bytes[20]
Definition: TransmittedPackets.hpp:31954

References _action_type, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _target_guid, _unused_bytes, _unused_bytes2, ByteBuffer::append(), Horizon::Base::NetworkPacket< ZoneSession >::buf(), and Horizon::Base::NetworkPacket< ZoneSession >::get_session().

Referenced by deliver().

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

Member Data Documentation

◆ _action_type

int8_t Horizon::Zone::ZC_NOTIFY_ACT::_action_type {2}

Referenced by deliver(), and serialize().

◆ _target_guid

int32_t Horizon::Zone::ZC_NOTIFY_ACT::_target_guid { 0 }

Referenced by deliver(), and serialize().

◆ _unused_bytes

int8_t Horizon::Zone::ZC_NOTIFY_ACT::_unused_bytes[20]

Referenced by serialize().

◆ _unused_bytes2

int8_t Horizon::Zone::ZC_NOTIFY_ACT::_unused_bytes2[2]

Referenced by serialize().


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