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

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

#include <HandledPackets.hpp>

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

Public Member Functions

 CZ_PET_EVOLUTION (std::shared_ptr< ZoneSession > s)
 
virtual ~CZ_PET_EVOLUTION ()
 
void handle (ByteBuffer &&buf)
 CZ_PET_EVOLUTION. 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 }
 
int16_t _evolved_pet_egg_id { 0 }
 
std::vector< cz_pet_evolution_itemlist_items
 

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

Constructor & Destructor Documentation

◆ CZ_PET_EVOLUTION()

Horizon::Zone::CZ_PET_EVOLUTION::CZ_PET_EVOLUTION ( std::shared_ptr< ZoneSession s)
inline
17867 : NetworkPacket<ZoneSession>(ID_CZ_PET_EVOLUTION, s)
17868 {}
@ ID_CZ_PET_EVOLUTION
Definition: HandledPackets.hpp:17843

◆ ~CZ_PET_EVOLUTION()

virtual Horizon::Zone::CZ_PET_EVOLUTION::~CZ_PET_EVOLUTION ( )
inlinevirtual
17869{}

Member Function Documentation

◆ deserialize()

void CZ_PET_EVOLUTION::deserialize ( ByteBuffer buf)
virtual

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

2968{
2969 buf >> _packet_id;
2972 for (int i = 0; i < ((_packet_length - 6) / sizeof(cz_pet_evolution_itemlist)); i++) {
2974 buf >> item.inventory_index;
2975 buf >> item.amount;
2976 _items.push_back(item);
2977 }
2978}
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
std::vector< cz_pet_evolution_itemlist > _items
Definition: HandledPackets.hpp:17877
int16_t _packet_length
Definition: HandledPackets.hpp:17875
int16_t _evolved_pet_egg_id
Definition: HandledPackets.hpp:17876
Definition: ClientDefinitions.hpp:696
int16_t inventory_index
Definition: ClientDefinitions.hpp:696
int16_t amount
Definition: ClientDefinitions.hpp:696

References _evolved_pet_egg_id, _items, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _packet_length, cz_pet_evolution_itemlist::amount, Horizon::Base::NetworkPacket< ZoneSession >::buf(), and cz_pet_evolution_itemlist::inventory_index.

Referenced by handle().

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

◆ handle()

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

CZ_PET_EVOLUTION.

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

2963{
2965 get_session()->clif()->pet_evolve(_evolved_pet_egg_id, _items);
2966}
std::shared_ptr< ZoneSession > get_session()
Retrieves the session from this handler instance.
Definition: NetworkPacket.hpp:65
void deserialize(ByteBuffer &buf)
Definition: HandledPackets.cpp:2967

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

+ Here is the call graph for this function:

Member Data Documentation

◆ _evolved_pet_egg_id

int16_t Horizon::Zone::CZ_PET_EVOLUTION::_evolved_pet_egg_id { 0 }

Referenced by deserialize(), and handle().

◆ _items

std::vector<cz_pet_evolution_itemlist> Horizon::Zone::CZ_PET_EVOLUTION::_items

Referenced by deserialize(), and handle().

◆ _packet_length

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

Referenced by deserialize().


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