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

#include <AuthenticationPackets.h>

Public Member Functions

 AuthSession (WorldPacket &&packet)
 
void Read () override
 
- Public Member Functions inherited from WorldPackets::ClientPacket
 ClientPacket (WorldPacket &&packet)
 
 ClientPacket (OpcodeClient expectedOpcode, WorldPacket &&packet)
 
WorldPacket constWrite () overridefinal
 
OpcodeClient 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

uint16 Build = 0
 
int8 BuildType = 0
 
uint32 RegionID = 0
 
uint32 BattlegroupID = 0
 
uint32 RealmID = 0
 
std::array< uint8, 16 > LocalChallenge
 
std::array< uint8, DigestLengthDigest
 
uint64 DosResponse = 0
 
ByteBuffer AddonInfo
 
std::string RealmJoinTicket
 
bool UseIPv6 = false
 

Static Public Attributes

static uint32 const DigestLength = 24
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Auth::AuthSession::AuthSession ( WorldPacket &&  packet)
inline
51  : ClientPacket(CMSG_AUTH_SESSION, std::move(packet))
52  {
53  LocalChallenge.fill(0);
54  Digest.fill(0);
55  }
Definition: Opcodes.h:74
std::array< uint8, DigestLength > Digest
Definition: AuthenticationPackets.h:65
ClientPacket(WorldPacket &&packet)
Definition: Packet.h:62
std::array< uint8, 16 > LocalChallenge
Definition: AuthenticationPackets.h:64

Member Function Documentation

void WorldPackets::Auth::AuthSession::Read ( )
overridevirtual

Implements WorldPackets::Packet.

30 {
31  uint32 addonDataSize, realmJoinTicketSize;
32 
39  _worldPacket.read(Digest.data(), Digest.size());
41  _worldPacket >> addonDataSize;
42  if (addonDataSize)
43  {
44  AddonInfo.resize(std::min(addonDataSize, uint32(_worldPacket.size() - _worldPacket.rpos())));
45  _worldPacket.read(AddonInfo.contents(), AddonInfo.size());
46  }
47 
48  _worldPacket >> realmJoinTicketSize;
49  if (realmJoinTicketSize)
50  {
51  RealmJoinTicket.resize(std::min(realmJoinTicketSize, uint32(_worldPacket.size() - _worldPacket.rpos())));
52  _worldPacket.read(reinterpret_cast<uint8*>(&RealmJoinTicket[0]), RealmJoinTicket.size());
53  }
54 
55  UseIPv6 = _worldPacket.ReadBit(); // UseIPv6
56 }
uint32 RegionID
Definition: AuthenticationPackets.h:61
std::string RealmJoinTicket
Definition: AuthenticationPackets.h:68
uint16 Build
Definition: AuthenticationPackets.h:59
Definition: AddonMgr.h:27
WorldPacket _worldPacket
Definition: Packet.h:43
int8 BuildType
Definition: AuthenticationPackets.h:60
T min(const T &x, const T &y)
Definition: g3dmath.h:305
size_t size() const
Definition: ByteBuffer.h:587
bool UseIPv6
Definition: AuthenticationPackets.h:69
uint32_t uint32
Definition: Define.h:150
std::array< uint8, DigestLength > Digest
Definition: AuthenticationPackets.h:65
uint32_t uint32
Definition: g3dmath.h:168
uint32 RealmID
Definition: AuthenticationPackets.h:63
size_t rpos() const
Definition: ByteBuffer.h:441
bool ReadBit()
Definition: ByteBuffer.h:186
uint64 DosResponse
Definition: AuthenticationPackets.h:66
uint32 BattlegroupID
Definition: AuthenticationPackets.h:62
T read()
Definition: ByteBuffer.h:484
std::array< uint8, 16 > LocalChallenge
Definition: AuthenticationPackets.h:64

+ Here is the call graph for this function:

Member Data Documentation

ByteBuffer WorldPackets::Auth::AuthSession::AddonInfo
uint32 WorldPackets::Auth::AuthSession::BattlegroupID = 0
uint16 WorldPackets::Auth::AuthSession::Build = 0
int8 WorldPackets::Auth::AuthSession::BuildType = 0
std::array<uint8, DigestLength> WorldPackets::Auth::AuthSession::Digest
uint32 const WorldPackets::Auth::AuthSession::DigestLength = 24
static
uint64 WorldPackets::Auth::AuthSession::DosResponse = 0
std::array<uint8, 16> WorldPackets::Auth::AuthSession::LocalChallenge
uint32 WorldPackets::Auth::AuthSession::RealmID = 0
std::string WorldPackets::Auth::AuthSession::RealmJoinTicket
uint32 WorldPackets::Auth::AuthSession::RegionID = 0
bool WorldPackets::Auth::AuthSession::UseIPv6 = false

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