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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_GUILD_SKILLINFO (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_GUILD_SKILLINFO ()
 
void deliver (int skill_points, std::vector< s_zc_guild_skillinfo > skillinfo)
 ZC_GUILD_SKILLINFO. 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

int16_t _packet_length { 0 }
 
int16_t _skill_points { 0 }
 
std::vector< s_zc_guild_skillinfo_skillinfo
 

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

Constructor & Destructor Documentation

◆ ZC_GUILD_SKILLINFO()

Horizon::Zone::ZC_GUILD_SKILLINFO::ZC_GUILD_SKILLINFO ( std::shared_ptr< ZoneSession s)
inline
27437 : NetworkPacket<ZoneSession>(ID_ZC_GUILD_SKILLINFO, s)
27438 {}
@ ID_ZC_GUILD_SKILLINFO
Definition: TransmittedPackets.hpp:27410

◆ ~ZC_GUILD_SKILLINFO()

virtual Horizon::Zone::ZC_GUILD_SKILLINFO::~ZC_GUILD_SKILLINFO ( )
inlinevirtual
27439{}

Member Function Documentation

◆ deliver()

void ZC_GUILD_SKILLINFO::deliver ( int  skill_points,
std::vector< s_zc_guild_skillinfo skillinfo 
)

ZC_GUILD_SKILLINFO.

1454{
1455 _packet_length = 6 + sizeof(s_zc_guild_skillinfo) * skillinfo.size();
1456 _skill_points = skill_points;
1457 _skillinfo = skillinfo;
1458
1459 serialize();
1460 transmit();
1461}
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
std::vector< s_zc_guild_skillinfo > _skillinfo
Definition: TransmittedPackets.hpp:27447
int16_t _packet_length
Definition: TransmittedPackets.hpp:27445
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:1463
int16_t _skill_points
Definition: TransmittedPackets.hpp:27446
Definition: ClientDefinitions.hpp:492

References _packet_length, _skill_points, _skillinfo, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

+ Here is the call graph for this function:

◆ serialize()

ByteBuffer & ZC_GUILD_SKILLINFO::serialize ( )
1464{
1465 buf() << _packet_id;
1466 buf() << _packet_length;
1467 buf() << _skill_points;
1468 for (auto s : _skillinfo) {
1469 buf() << s.skill_id;
1470 buf() << s.type;
1471 buf() << s.level;
1472 buf() << s.sp_cost;
1473 buf() << s.attack_range;
1474 buf().append(s.skill_name, MAX_SKILL_NAME_LENGTH);
1475 buf() << s.upgradeable;
1476 }
1477 return buf();
1478}
#define MAX_SKILL_NAME_LENGTH
Definition: SkillDefinitions.hpp:43
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

References Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _packet_length, _skill_points, _skillinfo, ByteBuffer::append(), Horizon::Base::NetworkPacket< ZoneSession >::buf(), and MAX_SKILL_NAME_LENGTH.

Referenced by deliver().

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

Member Data Documentation

◆ _packet_length

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

Referenced by deliver(), and serialize().

◆ _skill_points

int16_t Horizon::Zone::ZC_GUILD_SKILLINFO::_skill_points { 0 }

Referenced by deliver(), and serialize().

◆ _skillinfo

std::vector<s_zc_guild_skillinfo> Horizon::Zone::ZC_GUILD_SKILLINFO::_skillinfo

Referenced by deliver(), and serialize().


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