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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_NOTIFY_STANDENTRY11 (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_NOTIFY_STANDENTRY11 ()
 
void deliver (unit_viewport_entry entry)
 ZC_NOTIFY_STANDENTRY11. 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

unit_viewport_entry _entry
 

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

Constructor & Destructor Documentation

◆ ZC_NOTIFY_STANDENTRY11()

Horizon::Zone::ZC_NOTIFY_STANDENTRY11::ZC_NOTIFY_STANDENTRY11 ( std::shared_ptr< ZoneSession s)
inline
34783 : NetworkPacket<ZoneSession>(ID_ZC_NOTIFY_STANDENTRY11, s)
34784 {}
@ ID_ZC_NOTIFY_STANDENTRY11
Definition: TransmittedPackets.hpp:34759

◆ ~ZC_NOTIFY_STANDENTRY11()

virtual Horizon::Zone::ZC_NOTIFY_STANDENTRY11::~ZC_NOTIFY_STANDENTRY11 ( )
inlinevirtual
34785{}

Member Function Documentation

◆ deliver()

void ZC_NOTIFY_STANDENTRY11::deliver ( unit_viewport_entry  entry)

ZC_NOTIFY_STANDENTRY11.

5406{
5407 _entry = entry;
5408 serialize();
5409 transmit();
5410}
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:5412
unit_viewport_entry _entry
Definition: TransmittedPackets.hpp:34791

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

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

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

◆ serialize()

ByteBuffer & ZC_NOTIFY_STANDENTRY11::serialize ( )
5413{
5414 char packed_pos[3]{0};
5415
5416 buf() << _packet_id;
5417#if (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181121) \
5418|| (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180704) \
5419|| (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20181114)
5420 buf() << (int16_t) 108;
5421#else
5422 buf() << (int16_t) 104;
5423#endif
5424 buf() << (int8_t) _entry._unit_type;
5425 buf() << _entry._guid;
5426 buf() << _entry.character_id;
5427 buf() << _entry.speed;
5428 buf() << _entry.body_state;
5429 buf() << _entry.health_state;
5430 buf() << _entry.effect_state;
5431 buf() << _entry.job_id;
5433 buf() << _entry.weapon_id;
5434#if (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181121) \
5435|| (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180704) \
5436|| (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20181114)
5437 buf() << _entry.shield_id;
5438#endif
5444 buf() << (int16_t) _entry.head_direction;
5445 buf() << _entry.robe_id;
5446 buf() << _entry.guild_id;
5448 buf() << _entry.honor;
5449 buf() << _entry.virtue;
5450 buf() << _entry.in_pk_mode;
5451 buf() << _entry.gender;
5453 buf().append(packed_pos, sizeof(packed_pos));
5454 buf() << _entry.x_size;
5455 buf() << _entry.y_size;
5456 buf() << (int8_t) _entry.posture;
5457 buf() << _entry.base_level;
5458 buf() << _entry.font;
5459 buf() << _entry.max_hp;
5460 buf() << _entry.hp;
5461 buf() << _entry.is_boss;
5463 buf().append(_entry.name, sizeof(_entry.name));
5464
5465 return buf();
5466}
void PackPosition(int8_t *p, uint16_t x, uint16_t y, uint8_t dir)
Definition: Utility.cpp:141
void append(T value)
Definition: ByteBuffer.hpp:140
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
directions head_direction
Definition: UnitDefinitions.hpp:915
int16_t robe_id
Definition: UnitDefinitions.hpp:916
int16_t base_level
Definition: UnitDefinitions.hpp:928
int32_t max_hp
Definition: UnitDefinitions.hpp:930
int8_t in_pk_mode
Definition: UnitDefinitions.hpp:921
int16_t guild_emblem_version
Definition: UnitDefinitions.hpp:918
int32_t hp
Definition: UnitDefinitions.hpp:931
int16_t job_id
Definition: UnitDefinitions.hpp:902
int32_t guild_id
Definition: UnitDefinitions.hpp:917
int16_t hair_color_id
Definition: UnitDefinitions.hpp:913
int32_t character_id
Definition: UnitDefinitions.hpp:897
int16_t honor
Definition: UnitDefinitions.hpp:919
int16_t font
Definition: UnitDefinitions.hpp:929
int8_t is_boss
Definition: UnitDefinitions.hpp:932
int32_t virtue
Definition: UnitDefinitions.hpp:920
int16_t headgear_top_id
Definition: UnitDefinitions.hpp:911
int16_t body_style_id
Definition: UnitDefinitions.hpp:933
int32_t shield_id
Definition: UnitDefinitions.hpp:908
int16_t speed
Definition: UnitDefinitions.hpp:898
int16_t current_dir
Definition: UnitDefinitions.hpp:923
int32_t effect_state
Definition: UnitDefinitions.hpp:901
int32_t weapon_id
Definition: UnitDefinitions.hpp:904
unit_posture_type posture
Definition: UnitDefinitions.hpp:927
int16_t headgear_mid_id
Definition: UnitDefinitions.hpp:912
int16_t body_state
Definition: UnitDefinitions.hpp:899
char name[MAX_UNIT_NAME_LENGTH]
Definition: UnitDefinitions.hpp:934
int16_t headgear_bottom_id
Definition: UnitDefinitions.hpp:910
int16_t cloth_color_id
Definition: UnitDefinitions.hpp:914
int8_t x_size
Definition: UnitDefinitions.hpp:925
int16_t health_state
Definition: UnitDefinitions.hpp:900
int16_t hair_style_id
Definition: UnitDefinitions.hpp:903
int8_t y_size
Definition: UnitDefinitions.hpp:926
int16_t current_y
Definition: UnitDefinitions.hpp:923
int16_t current_x
Definition: UnitDefinitions.hpp:923
int8_t gender
Definition: UnitDefinitions.hpp:922
uint32_t _guid
Definition: UnitDefinitions.hpp:848
unit_type _unit_type
Definition: UnitDefinitions.hpp:847

References _entry, viewport_entry::_guid, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, viewport_entry::_unit_type, ByteBuffer::append(), unit_viewport_entry::base_level, unit_viewport_entry::body_state, unit_viewport_entry::body_style_id, Horizon::Base::NetworkPacket< ZoneSession >::buf(), unit_viewport_entry::character_id, unit_viewport_entry::cloth_color_id, unit_viewport_entry::current_dir, unit_viewport_entry::current_x, unit_viewport_entry::current_y, unit_viewport_entry::effect_state, unit_viewport_entry::font, unit_viewport_entry::gender, unit_viewport_entry::guild_emblem_version, unit_viewport_entry::guild_id, unit_viewport_entry::hair_color_id, unit_viewport_entry::hair_style_id, unit_viewport_entry::head_direction, unit_viewport_entry::headgear_bottom_id, unit_viewport_entry::headgear_mid_id, unit_viewport_entry::headgear_top_id, unit_viewport_entry::health_state, unit_viewport_entry::honor, unit_viewport_entry::hp, unit_viewport_entry::in_pk_mode, unit_viewport_entry::is_boss, unit_viewport_entry::job_id, unit_viewport_entry::max_hp, unit_viewport_entry::name, PackPosition(), unit_viewport_entry::posture, unit_viewport_entry::robe_id, unit_viewport_entry::shield_id, unit_viewport_entry::speed, unit_viewport_entry::virtue, unit_viewport_entry::weapon_id, unit_viewport_entry::x_size, and unit_viewport_entry::y_size.

Referenced by deliver().

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

Member Data Documentation

◆ _entry

unit_viewport_entry Horizon::Zone::ZC_NOTIFY_STANDENTRY11::_entry

Referenced by deliver(), and serialize().


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