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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ ZC_NOTIFY_MOVEENTRY11()

Horizon::Zone::ZC_NOTIFY_MOVEENTRY11::ZC_NOTIFY_MOVEENTRY11 ( std::shared_ptr< ZoneSession s)
inline
33442 : NetworkPacket<ZoneSession>(ID_ZC_NOTIFY_MOVEENTRY11, s)
33443 {}
@ ID_ZC_NOTIFY_MOVEENTRY11
Definition: TransmittedPackets.hpp:33418

◆ ~ZC_NOTIFY_MOVEENTRY11()

virtual Horizon::Zone::ZC_NOTIFY_MOVEENTRY11::~ZC_NOTIFY_MOVEENTRY11 ( )
inlinevirtual
33444{}

Member Function Documentation

◆ deliver()

void ZC_NOTIFY_MOVEENTRY11::deliver ( unit_viewport_entry  entry)

ZC_NOTIFY_MOVEENTRY11.

5272{
5273 _entry = entry;
5274 serialize();
5275 transmit();
5276}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
unit_viewport_entry _entry
Definition: TransmittedPackets.hpp:33450
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:5278

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

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

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

◆ serialize()

ByteBuffer & ZC_NOTIFY_MOVEENTRY11::serialize ( )
5279{
5280 char packed_pos[6]{0};
5281
5282 HLog(info) << "Packet[MoveStartTime]: " << _entry.move_start_time;
5283
5284 buf() << _packet_id;
5285#if (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181121) \
5286|| (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180704) \
5287|| (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20181114)
5288 buf() << (int16_t) 114;
5289#else
5290 buf() << (int16_t) 110;
5291#endif
5292 buf() << (int8_t) _entry._unit_type;
5293 buf() << _entry._guid;
5294 buf() << _entry.character_id;
5295 buf() << _entry.speed;
5296 buf() << _entry.body_state;
5297 buf() << _entry.health_state;
5298 buf() << _entry.effect_state;
5299 buf() << _entry.job_id;
5301 buf() << _entry.weapon_id;
5302#if (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181121) \
5303|| (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180704) \
5304|| (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20181114)
5305 buf() << _entry.shield_id;
5306#endif
5313 buf() << (int16_t) _entry.head_direction;
5314 buf() << _entry.robe_id;
5315 buf() << _entry.guild_id;
5317 buf() << _entry.honor;
5318 buf() << _entry.virtue;
5319 buf() << _entry.in_pk_mode;
5320 buf() << _entry.gender;
5321 PackPosition((int8_t *) packed_pos, _entry.current_x, _entry.current_y, _entry.to_x, _entry.to_y, 8, 8);
5322 buf().append(packed_pos, sizeof(packed_pos));
5323 buf() << _entry.x_size;
5324 buf() << _entry.y_size;
5325 buf() << _entry.base_level;
5326 buf() << _entry.font;
5327 buf() << _entry.max_hp;
5328 buf() << _entry.hp;
5329 buf() << _entry.is_boss;
5331 buf().append(_entry.name, sizeof(_entry.name));
5332
5333 return buf();
5334}
#define HLog(type)
Definition: Logger.hpp:122
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
int32_t move_start_time
Definition: UnitDefinitions.hpp:935
int16_t speed
Definition: UnitDefinitions.hpp:898
int32_t effect_state
Definition: UnitDefinitions.hpp:901
int32_t weapon_id
Definition: UnitDefinitions.hpp:904
int16_t to_y
Definition: UnitDefinitions.hpp:924
int16_t headgear_mid_id
Definition: UnitDefinitions.hpp:912
int16_t to_x
Definition: UnitDefinitions.hpp:924
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_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, HLog, 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::move_start_time, unit_viewport_entry::name, PackPosition(), unit_viewport_entry::robe_id, unit_viewport_entry::shield_id, unit_viewport_entry::speed, unit_viewport_entry::to_x, unit_viewport_entry::to_y, 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_MOVEENTRY11::_entry

Referenced by deliver(), and serialize().


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