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

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

#include <HandledPackets.hpp>

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

Public Member Functions

 CZ_REG_CHANGE_GUILD_POSITIONINFO (std::shared_ptr< ZoneSession > s)
 
virtual ~CZ_REG_CHANGE_GUILD_POSITIONINFO ()
 
void handle (ByteBuffer &&buf)
 CZ_REG_CHANGE_GUILD_POSITIONINFO. More...
 
void deserialize (ByteBuffer &buf)
 
- 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 _packet_length { 0 }
 
std::vector< s_cz_reg_change_guild_positioninfo_info
 

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: CZ_REG_CHANGE_GUILD_POSITIONINFO.

Constructor & Destructor Documentation

◆ CZ_REG_CHANGE_GUILD_POSITIONINFO()

Horizon::Zone::CZ_REG_CHANGE_GUILD_POSITIONINFO::CZ_REG_CHANGE_GUILD_POSITIONINFO ( std::shared_ptr< ZoneSession s)
inline
18513 : NetworkPacket<ZoneSession>(ID_CZ_REG_CHANGE_GUILD_POSITIONINFO, s)
18514 {}
@ ID_CZ_REG_CHANGE_GUILD_POSITIONINFO
Definition: HandledPackets.hpp:18486

◆ ~CZ_REG_CHANGE_GUILD_POSITIONINFO()

virtual Horizon::Zone::CZ_REG_CHANGE_GUILD_POSITIONINFO::~CZ_REG_CHANGE_GUILD_POSITIONINFO ( )
inlinevirtual
18515{}

Member Function Documentation

◆ deserialize()

void CZ_REG_CHANGE_GUILD_POSITIONINFO::deserialize ( ByteBuffer buf)
virtual

Reimplemented from Horizon::Base::NetworkPacket< ZoneSession >.

975{
976 buf >> _packet_id;
978 for (int i = 0; i < ((_packet_length - 4) / sizeof(s_cz_reg_change_guild_positioninfo)); i++) {
980 buf >> g.position_id;
981 buf >> g.mode;
982 buf >> g.ranking;
983 buf >> g.pay_rate;
985 _info.push_back(g);
986 }
987}
#define MAX_GUILD_POSITION_NAME_LENGTH
Definition: Client.hpp:37
T read()
Definition: ByteBuffer.hpp:379
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
std::vector< s_cz_reg_change_guild_positioninfo > _info
Definition: HandledPackets.hpp:18522
int16_t _packet_length
Definition: HandledPackets.hpp:18521
Definition: ClientDefinitions.hpp:568
int pay_rate
Definition: ClientDefinitions.hpp:572
int ranking
Definition: ClientDefinitions.hpp:571
int mode
Definition: ClientDefinitions.hpp:570
int position_id
Definition: ClientDefinitions.hpp:569
char name[MAX_GUILD_POSITION_NAME_LENGTH]
Definition: ClientDefinitions.hpp:573

References _info, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _packet_length, Horizon::Base::NetworkPacket< ZoneSession >::buf(), MAX_GUILD_POSITION_NAME_LENGTH, s_cz_reg_change_guild_positioninfo::mode, s_cz_reg_change_guild_positioninfo::name, s_cz_reg_change_guild_positioninfo::pay_rate, s_cz_reg_change_guild_positioninfo::position_id, s_cz_reg_change_guild_positioninfo::ranking, and ByteBuffer::read().

Referenced by handle().

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

◆ handle()

void CZ_REG_CHANGE_GUILD_POSITIONINFO::handle ( ByteBuffer &&  buf)
virtual

CZ_REG_CHANGE_GUILD_POSITIONINFO.

Reimplemented from Horizon::Base::NetworkPacket< ZoneSession >.

969{
971 get_session()->clif()->guild().change_position_info(_info);
972}
std::shared_ptr< ZoneSession > get_session()
Retrieves the session from this handler instance.
Definition: NetworkPacket.hpp:65
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:974

References _info, Horizon::Base::NetworkPacket< ZoneSession >::buf(), deserialize(), and Horizon::Base::NetworkPacket< ZoneSession >::get_session().

+ Here is the call graph for this function:

Member Data Documentation

◆ _info

std::vector<s_cz_reg_change_guild_positioninfo> Horizon::Zone::CZ_REG_CHANGE_GUILD_POSITIONINFO::_info

Referenced by deserialize(), and handle().

◆ _packet_length

int16_t Horizon::Zone::CZ_REG_CHANGE_GUILD_POSITIONINFO::_packet_length { 0 }

Referenced by deserialize().


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