TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::Guild::GuildBankQueryResults Class Referencefinal

#include <GuildPackets.h>

Public Member Functions

 GuildBankQueryResults ()
 
WorldPacket constWrite () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
void Read () overridefinal
 
void Clear ()
 
WorldPacket && Move ()
 
OpcodeServer GetOpcode () const
 
- Public Member Functions inherited from WorldPackets::Packet
 Packet (WorldPacket &&worldPacket)
 
virtual ~Packet ()=default
 
 Packet (Packet const &right)=delete
 
Packetoperator= (Packet const &right)=delete
 
WorldPacket constGetRawPacket () const
 
size_t GetSize () const
 
ConnectionType GetConnection () const
 

Public Attributes

std::vector< GuildBankItemInfoItemInfo
 
std::vector< GuildBankTabInfoTabInfo
 
int32 WithdrawalsRemaining = 0
 
int32 Tab = 0
 
uint64 Money = 0
 
bool FullUpdate = false
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Guild::GuildBankQueryResults::GuildBankQueryResults ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1068

Member Function Documentation

WorldPacket const * WorldPackets::Guild::GuildBankQueryResults::Write ( )
overridevirtual

Implements WorldPackets::Packet.

597 {
598  _worldPacket << Money;
599  _worldPacket << Tab;
601  _worldPacket << uint32(TabInfo.size());
602  _worldPacket << uint32(ItemInfo.size());
603 
604  for (GuildBankTabInfo const& tab : TabInfo)
605  {
606  _worldPacket << tab.TabIndex;
607  _worldPacket.WriteBits(tab.Name.length(), 7);
608  _worldPacket.WriteBits(tab.Icon.length(), 9);
610 
611  _worldPacket.WriteString(tab.Name);
612  _worldPacket.WriteString(tab.Icon);
613  }
614 
615  for (GuildBankItemInfo const& item : ItemInfo)
616  {
617  _worldPacket << item.Slot;
618  _worldPacket << item.Item;
619  _worldPacket << item.Count;
620  _worldPacket << item.EnchantmentID;
621  _worldPacket << item.Charges;
622  _worldPacket << item.OnUseEnchantmentID;
623  _worldPacket << uint32(item.SocketEnchant.size());
624  _worldPacket << item.Flags;
625 
626  for (GuildBankItemInfo::GuildBankSocketEnchant const& socketEnchant : item.SocketEnchant)
627  {
628  _worldPacket << socketEnchant.SocketIndex;
629  _worldPacket << socketEnchant.SocketEnchantID;
630  }
631 
632  _worldPacket.WriteBit(item.Locked);
634  }
635 
638 
639  return &_worldPacket;
640 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
int32 Tab
Definition: GuildPackets.h:817
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
uint64 Money
Definition: GuildPackets.h:818
std::vector< GuildBankItemInfo > ItemInfo
Definition: GuildPackets.h:814
std::vector< GuildBankTabInfo > TabInfo
Definition: GuildPackets.h:815
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198
bool FullUpdate
Definition: GuildPackets.h:819
int32 WithdrawalsRemaining
Definition: GuildPackets.h:816

+ Here is the caller graph for this function:

Member Data Documentation

bool WorldPackets::Guild::GuildBankQueryResults::FullUpdate = false
std::vector<GuildBankItemInfo> WorldPackets::Guild::GuildBankQueryResults::ItemInfo
uint64 WorldPackets::Guild::GuildBankQueryResults::Money = 0
int32 WorldPackets::Guild::GuildBankQueryResults::Tab = 0
std::vector<GuildBankTabInfo> WorldPackets::Guild::GuildBankQueryResults::TabInfo
int32 WorldPackets::Guild::GuildBankQueryResults::WithdrawalsRemaining = 0

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