AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
WorldPackets::Guild::GuildEventLogQueryResults Class Referencefinal

#include "GuildPackets.h"

Inheritance diagram for WorldPackets::Guild::GuildEventLogQueryResults:
WorldPackets::ServerPacket WorldPackets::Packet

Public Member Functions

 GuildEventLogQueryResults ()
 
WorldPacket const * Write () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, std::size_t initialSize=200)
 
void Read () final
 
void Clear ()
 
WorldPacket && Move ()
 
void ShrinkToFit ()
 
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
 
virtual WorldPacket const * Write ()=0
 
virtual void Read ()=0
 
WorldPacket const * GetRawPacket () const
 
std::size_t GetSize () const
 

Public Attributes

std::vector< GuildEventEntryEntry
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Detailed Description

Constructor & Destructor Documentation

◆ GuildEventLogQueryResults()

WorldPackets::Guild::GuildEventLogQueryResults::GuildEventLogQueryResults ( )
inline
@ MSG_GUILD_EVENT_LOG_QUERY
Definition: Opcodes.h:1053
ServerPacket(OpcodeServer opcode, std::size_t initialSize=200)
Definition: Packet.cpp:25

Member Function Documentation

◆ Write()

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

Implements WorldPackets::Packet.

145{
146 _worldPacket.reserve(1 + Entry.size() * sizeof(GuildEventEntry));
147
148 _worldPacket << uint8(Entry.size());
149
150 for (GuildEventEntry const& entry : Entry)
151 {
152 _worldPacket << uint8(entry.TransactionType);
153 _worldPacket << entry.PlayerGUID;
154 if (entry.TransactionType != GUILD_EVENT_LOG_JOIN_GUILD && entry.TransactionType != GUILD_EVENT_LOG_LEAVE_GUILD)
155 _worldPacket << entry.OtherGUID;
156 if (entry.TransactionType == GUILD_EVENT_LOG_PROMOTE_PLAYER || entry.TransactionType == GUILD_EVENT_LOG_DEMOTE_PLAYER)
157 _worldPacket << uint8(entry.RankID);
158 _worldPacket << uint32(entry.TransactionDate);
159 }
160
161 return &_worldPacket;
162}
std::uint8_t uint8
Definition: Define.h:109
std::uint32_t uint32
Definition: Define.h:107
@ GUILD_EVENT_LOG_LEAVE_GUILD
Definition: Guild.h:215
@ GUILD_EVENT_LOG_PROMOTE_PLAYER
Definition: Guild.h:212
@ GUILD_EVENT_LOG_DEMOTE_PLAYER
Definition: Guild.h:213
@ GUILD_EVENT_LOG_JOIN_GUILD
Definition: Guild.h:211
WorldPacket _worldPacket
Definition: Packet.h:42
std::vector< GuildEventEntry > Entry
Definition: GuildPackets.h:238
void reserve(std::size_t ressize)
Definition: ByteBuffer.h:454

References Entry, GUILD_EVENT_LOG_DEMOTE_PLAYER, GUILD_EVENT_LOG_JOIN_GUILD, GUILD_EVENT_LOG_LEAVE_GUILD, GUILD_EVENT_LOG_PROMOTE_PLAYER, and ByteBuffer::reserve().

Referenced by Guild::SendEventLog().

Member Data Documentation

◆ Entry

std::vector<GuildEventEntry> WorldPackets::Guild::GuildEventLogQueryResults::Entry