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

#include <ReferAFriendPackets.h>

Public Member Functions

 ReferAFriendFailure ()
 
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::string Str
 
int32 Reason = 0
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::RaF::ReferAFriendFailure::ReferAFriendFailure ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1440

Member Function Documentation

WorldPacket const * WorldPackets::RaF::ReferAFriendFailure::Write ( )
overridevirtual

Implements WorldPackets::Packet.

38 {
40  // Client uses this string only if Reason == ERR_REFER_A_FRIEND_NOT_IN_GROUP || Reason == ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S
41  // but always reads it from packet
42  _worldPacket.WriteBits(Str.length(), 6);
45 
46  return &_worldPacket;
47 }
int32 Reason
Definition: ReferAFriendPackets.h:66
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
std::string Str
Definition: ReferAFriendPackets.h:65
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
int32_t int32
Definition: g3dmath.h:167
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the caller graph for this function:

Member Data Documentation

int32 WorldPackets::RaF::ReferAFriendFailure::Reason = 0
std::string WorldPackets::RaF::ReferAFriendFailure::Str

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