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

#include <GuildPackets.h>

Public Member Functions

 GuildBankLogQueryResults ()
 
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

int32 Tab = 0
 
std::vector< GuildBankLogEntryEntry
 
Optional< uint64WeeklyBonusMoney
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements WorldPackets::Packet.

668 {
669  _worldPacket << Tab;
670  _worldPacket << uint32(Entry.size());
671 
672  for (GuildBankLogEntry const& logEntry : Entry)
673  {
674  _worldPacket << logEntry.PlayerGUID;
675  _worldPacket << logEntry.TimeOffset;
676  _worldPacket << logEntry.EntryType;
677 
678  _worldPacket.WriteBit(logEntry.Money.is_initialized());
679  _worldPacket.WriteBit(logEntry.ItemID.is_initialized());
680  _worldPacket.WriteBit(logEntry.Count.is_initialized());
681  _worldPacket.WriteBit(logEntry.OtherTab.is_initialized());
683 
684  if (logEntry.Money.is_initialized())
685  _worldPacket << *logEntry.Money;
686 
687  if (logEntry.ItemID.is_initialized())
688  _worldPacket << *logEntry.ItemID;
689 
690  if (logEntry.Count.is_initialized())
691  _worldPacket << *logEntry.Count;
692 
693  if (logEntry.OtherTab.is_initialized())
694  _worldPacket << *logEntry.OtherTab;
695  }
696 
697  _worldPacket.WriteBit(WeeklyBonusMoney.is_initialized());
699 
700  if (WeeklyBonusMoney)
702 
703  return &_worldPacket;
704 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
Entry
Definition: boss_headless_horseman.cpp:50
int32 Tab
Definition: GuildPackets.h:873
uint32_t uint32
Definition: g3dmath.h:168
Optional< uint64 > WeeklyBonusMoney
Definition: GuildPackets.h:875

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<GuildBankLogEntry> WorldPackets::Guild::GuildBankLogQueryResults::Entry
int32 WorldPackets::Guild::GuildBankLogQueryResults::Tab = 0
Optional<uint64> WorldPackets::Guild::GuildBankLogQueryResults::WeeklyBonusMoney

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