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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_UPDATE_GDID (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_UPDATE_GDID ()
 
void deliver (int guild_id, int emblem_id, int mode, int is_master, std::string guild_name)
 ZC_UPDATE_GDID. 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

int _guild_id { 0 }
 
int _emblem_id { 0 }
 
int _mode { 0 }
 
int8_t _is_master { 0 }
 
int _inter_sid { 0 }
 
char _guild_name [MAX_GUILD_NAME_LENGTH]
 

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

Constructor & Destructor Documentation

◆ ZC_UPDATE_GDID()

Horizon::Zone::ZC_UPDATE_GDID::ZC_UPDATE_GDID ( std::shared_ptr< ZoneSession s)
inline
45746 : NetworkPacket<ZoneSession>(ID_ZC_UPDATE_GDID, s)
45747 {}
@ ID_ZC_UPDATE_GDID
Definition: TransmittedPackets.hpp:45719

◆ ~ZC_UPDATE_GDID()

virtual Horizon::Zone::ZC_UPDATE_GDID::~ZC_UPDATE_GDID ( )
inlinevirtual
45748{}

Member Function Documentation

◆ deliver()

void ZC_UPDATE_GDID::deliver ( int  guild_id,
int  emblem_id,
int  mode,
int  is_master,
std::string  guild_name 
)

ZC_UPDATE_GDID.

3326{
3327 _guild_id = guild_id;
3328 _emblem_id = emblem_id;
3329 _mode = mode;
3330 _is_master = is_master;
3331 std::strncpy(_guild_name, guild_name.c_str(), MAX_GUILD_NAME_LENGTH);
3332 serialize();
3333 transmit();
3334}
#define MAX_GUILD_NAME_LENGTH
Definition: Client.hpp:36
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
int _emblem_id
Definition: TransmittedPackets.hpp:45758
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:3350
char _guild_name[MAX_GUILD_NAME_LENGTH]
Definition: TransmittedPackets.hpp:45762
int8_t _is_master
Definition: TransmittedPackets.hpp:45760
int _mode
Definition: TransmittedPackets.hpp:45759
int _guild_id
Definition: TransmittedPackets.hpp:45757

References _emblem_id, _guild_id, _guild_name, _is_master, _mode, s_related_guild_info::guild_id, s_related_guild_info::guild_name, MAX_GUILD_NAME_LENGTH, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

+ Here is the call graph for this function:

◆ serialize()

ByteBuffer & ZC_UPDATE_GDID::serialize ( )
3351{
3352 buf() << _packet_id;
3353 buf() << _guild_id;
3354 buf() << _emblem_id;
3355 buf() << _mode;
3356 buf() << _is_master;
3357 buf() << _inter_sid;
3359#if (CLIENT_VERSION == 'M' && PACKET_VERSION >= 20220216) || (CLIENT_VERSION == 'Z' && PACKET_VERSION >= 20221024)
3360 buf() << _master_char_id;
3361#endif
3362
3363 return buf();
3364}
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
int _inter_sid
Definition: TransmittedPackets.hpp:45761

References _emblem_id, _guild_id, _guild_name, _inter_sid, _is_master, _mode, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, ByteBuffer::append(), Horizon::Base::NetworkPacket< ZoneSession >::buf(), and MAX_GUILD_NAME_LENGTH.

Referenced by deliver().

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

Member Data Documentation

◆ _emblem_id

int Horizon::Zone::ZC_UPDATE_GDID::_emblem_id { 0 }

Referenced by deliver(), and serialize().

◆ _guild_id

int Horizon::Zone::ZC_UPDATE_GDID::_guild_id { 0 }

Referenced by deliver(), and serialize().

◆ _guild_name

char Horizon::Zone::ZC_UPDATE_GDID::_guild_name[MAX_GUILD_NAME_LENGTH]

Referenced by deliver(), and serialize().

◆ _inter_sid

int Horizon::Zone::ZC_UPDATE_GDID::_inter_sid { 0 }

Referenced by serialize().

◆ _is_master

int8_t Horizon::Zone::ZC_UPDATE_GDID::_is_master { 0 }

Referenced by deliver(), and serialize().

◆ _mode

int Horizon::Zone::ZC_UPDATE_GDID::_mode { 0 }

Referenced by deliver(), and serialize().


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