AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
WorldPackets::Query::NameQueryResponse Class Referencefinal

#include "QueryPackets.h"

Inheritance diagram for WorldPackets::Query::NameQueryResponse:
WorldPackets::ServerPacket WorldPackets::Packet

Public Member Functions

 NameQueryResponse ()
 
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
 
WorldPacket const * GetRawPacket () const
 
std::size_t GetSize () const
 

Public Attributes

PackedGuid Guid
 
uint8 NameUnknown = false
 
std::string_view Name
 
std::string_view RealmName = ""
 
uint8 Race = RACE_NONE
 
uint8 Sex = GENDER_MALE
 
uint8 Class = CLASS_NONE
 
uint8 Declined = false
 
DeclinedName DeclinedNames
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Detailed Description

Constructor & Destructor Documentation

◆ NameQueryResponse()

WorldPackets::Query::NameQueryResponse::NameQueryResponse ( )
inline
41: ServerPacket(SMSG_NAME_QUERY_RESPONSE, 8 + 1 + 1 + 1 + 1 + 1 + 10) {}
ServerPacket(OpcodeServer opcode, std::size_t initialSize=200)
Definition Packet.cpp:25
@ SMSG_NAME_QUERY_RESPONSE
Definition Opcodes.h:111

Member Function Documentation

◆ Write()

WorldPacket const * WorldPackets::Query::NameQueryResponse::Write ( )
overridevirtual

Implements WorldPackets::Packet.

26{
29 if (NameUnknown)
30 return &_worldPacket;
31
38 if (Declined)
39 {
40 for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
42 }
43
44 return &_worldPacket;
45}
std::uint8_t uint8
Definition Define.h:109
#define MAX_DECLINED_NAME_CASES
Definition Unit.h:530
WorldPacket _worldPacket
Definition Packet.h:42
DeclinedName DeclinedNames
Definition QueryPackets.h:53
uint8 Race
Definition QueryPackets.h:49
uint8 NameUnknown
Definition QueryPackets.h:46
std::string_view RealmName
Definition QueryPackets.h:48
uint8 Declined
Definition QueryPackets.h:52
uint8 Class
Definition QueryPackets.h:51
std::string_view Name
Definition QueryPackets.h:47
uint8 Sex
Definition QueryPackets.h:50
PackedGuid Guid
Definition QueryPackets.h:45
std::string name[MAX_DECLINED_NAME_CASES]
Definition Unit.h:534

References Class, MAX_DECLINED_NAME_CASES, and Race.

Referenced by WorldSession::SendNameQueryOpcode().

Member Data Documentation

◆ Class

uint8 WorldPackets::Query::NameQueryResponse::Class = CLASS_NONE

◆ Declined

uint8 WorldPackets::Query::NameQueryResponse::Declined = false

◆ DeclinedNames

DeclinedName WorldPackets::Query::NameQueryResponse::DeclinedNames

◆ Guid

PackedGuid WorldPackets::Query::NameQueryResponse::Guid

◆ Name

std::string_view WorldPackets::Query::NameQueryResponse::Name

◆ NameUnknown

uint8 WorldPackets::Query::NameQueryResponse::NameUnknown = false

◆ Race

uint8 WorldPackets::Query::NameQueryResponse::Race = RACE_NONE

◆ RealmName

std::string_view WorldPackets::Query::NameQueryResponse::RealmName = ""

◆ Sex

uint8 WorldPackets::Query::NameQueryResponse::Sex = GENDER_MALE

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