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

#include <CharacterPackets.h>

Classes

struct  CharFactionChangeDisplayInfo
 

Public Member Functions

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

uint8 Result = 0
 
ObjectGuid Guid
 
Optional
< CharFactionChangeDisplayInfo
Display
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Character::CharFactionChangeResult::CharFactionChangeResult ( )
inline
316 : ServerPacket(SMSG_CHAR_FACTION_CHANGE_RESULT, 20 + sizeof(CharFactionChangeDisplayInfo)) { }
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:896

Member Function Documentation

WorldPacket const * WorldPackets::Character::CharFactionChangeResult::Write ( )
overridevirtual

Implements WorldPackets::Packet.

287 {
289  _worldPacket << Guid;
290  _worldPacket.WriteBit(Display.is_initialized());
292 
293  if (Display)
294  {
295  _worldPacket.WriteBits(Display->Name.length(), 6);
296  _worldPacket << uint8(Display->SexID);
297  _worldPacket << uint8(Display->SkinID);
298  _worldPacket << uint8(Display->HairColorID);
299  _worldPacket << uint8(Display->HairStyleID);
300  _worldPacket << uint8(Display->FacialHairStyleID);
301  _worldPacket << uint8(Display->FaceID);
302  _worldPacket << uint8(Display->RaceID);
304  }
305 
306  return &_worldPacket;
307 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
ObjectGuid Guid
Definition: CharacterPackets.h:321
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
uint8 Result
Definition: CharacterPackets.h:320
uint8_t uint8
Definition: g3dmath.h:164
Optional< CharFactionChangeDisplayInfo > Display
Definition: CharacterPackets.h:322
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Optional<CharFactionChangeDisplayInfo> WorldPackets::Character::CharFactionChangeResult::Display
ObjectGuid WorldPackets::Character::CharFactionChangeResult::Guid
uint8 WorldPackets::Character::CharFactionChangeResult::Result = 0
See also
enum ResponseCodes

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