Main object for the aegis packet: ZC_INVENTORY_ITEMLIST_NORMAL_V5.
More...
#include <TransmittedPackets.hpp>
Main object for the aegis packet: ZC_INVENTORY_ITEMLIST_NORMAL_V5.
◆ ZC_INVENTORY_ITEMLIST_NORMAL_V5()
Horizon::Zone::ZC_INVENTORY_ITEMLIST_NORMAL_V5::ZC_INVENTORY_ITEMLIST_NORMAL_V5 |
( |
std::shared_ptr< ZoneSession > |
s | ) |
|
|
inline |
28321 {}
@ ID_ZC_INVENTORY_ITEMLIST_NORMAL_V5
Definition: TransmittedPackets.hpp:28296
◆ ~ZC_INVENTORY_ITEMLIST_NORMAL_V5()
virtual Horizon::Zone::ZC_INVENTORY_ITEMLIST_NORMAL_V5::~ZC_INVENTORY_ITEMLIST_NORMAL_V5 |
( |
| ) |
|
|
inlinevirtual |
◆ deliver()
void ZC_INVENTORY_ITEMLIST_NORMAL_V5::deliver |
( |
std::vector< std::shared_ptr< const item_entry_data > > const & |
items | ) |
|
ZC_INVENTORY_ITEMLIST_NORMAL_V5.
4753{
4755#if (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180912) || \
4756 (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20180919) || \
4757 (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181002)
4760#else
4762#endif
4765}
@ INVTYPE_INVENTORY
Definition: ClientDefinitions.hpp:906
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
std::vector< std::shared_ptr< const item_entry_data > > _items
Definition: TransmittedPackets.hpp:28334
int8_t _inventory_type
Definition: TransmittedPackets.hpp:28332
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:4767
int16_t _packet_length
Definition: TransmittedPackets.hpp:28328
References _inventory_type, _items, _packet_length, INVTYPE_INVENTORY, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().
◆ serialize()
ByteBuffer & ZC_INVENTORY_ITEMLIST_NORMAL_V5::serialize |
( |
| ) |
|
4768{
4769
4772#if (CLIENT_TYPE == 'R' && PACKET_VERSION >= 20180912) || \
4773 (CLIENT_TYPE == 'Z' && PACKET_VERSION >= 20180919) || \
4774 (CLIENT_TYPE == 'M' && PACKET_VERSION >= 20181002)
4776#endif
4777
4778 for (
auto it =
_items.begin(); it !=
_items.end(); it++) {
4779 std::shared_ptr<const item_entry_data> id = *it;
4780 uint8_t config = 0;
4781
4782 buf() <<
id->index.inventory;
4783 buf() << ((uint16_t) id->item_id);
4784 buf() << ((uint8_t) id->type);
4785 buf() <<
id->amount;
4786 buf() <<
id->current_equip_location_mask;
4787
4789 buf() <<
id->slot_item_id[i];
4790
4791 buf() <<
id->hire_expire_date;
4792
4793 config |= id->info.is_identified;
4794 config |= id->info.is_favorite << 1;
4796 }
4797
4799}
#define MAX_ITEM_SLOTS
Definition: ItemDefinitions.hpp:42
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59
References _inventory_type, _items, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _packet_length, Horizon::Base::NetworkPacket< ZoneSession >::buf(), and MAX_ITEM_SLOTS.
Referenced by deliver().
◆ _inventory_type
int8_t Horizon::Zone::ZC_INVENTORY_ITEMLIST_NORMAL_V5::_inventory_type { 0 } |
◆ _items
std::vector<std::shared_ptr<const item_entry_data> > Horizon::Zone::ZC_INVENTORY_ITEMLIST_NORMAL_V5::_items |
◆ _packet_length
int16_t Horizon::Zone::ZC_INVENTORY_ITEMLIST_NORMAL_V5::_packet_length {0} |
The documentation for this class was generated from the following files: