All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::ClientConfig::AddonInfo Class Referencefinal

#include <ClientConfigPackets.h>

Public Member Functions

 AddonInfo ()
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::list< ::AddonInfo > constAddons = nullptr
std::list< BannedAddon > constBannedAddons = nullptr

Static Private Attributes

static uint8 const PublicKey [256]

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket

Constructor & Destructor Documentation

WorldPackets::ClientConfig::AddonInfo::AddonInfo ( )
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:735

Member Function Documentation

WorldPacket const * AddonInfo::Write ( )

Implements WorldPackets::Packet.

41 {
42  _worldPacket << uint32(Addons ? Addons->size() : 0);
43  _worldPacket << uint32(BannedAddons ? BannedAddons->size() : 0);
45  if (Addons)
46  {
47  for (::AddonInfo const& addon : *Addons)
48  {
49  bool KeyProvided = addon.UsePublicKeyOrCRC && addon.CRC != STANDARD_ADDON_CRC;
50  _worldPacket << uint8(addon.Status);
52  _worldPacket.WriteBit(addon.Enabled); // InfoProvided
53  _worldPacket.WriteBit(KeyProvided); // KeyProvided
54  _worldPacket.WriteBit(0); // UrlProvided
56  if (addon.Enabled)
57  {
58  _worldPacket << uint8(1); // KeyVersion
59  _worldPacket << uint32(0); // Revision
60  }
62  if (KeyProvided)
63  _worldPacket.append(PublicKey, sizeof(PublicKey)); // KeyData
64  }
65  }
67  if (BannedAddons)
68  {
69  for (BannedAddon const& addon : *BannedAddons)
70  {
71  _worldPacket << uint32(addon.Id); // Id
72  _worldPacket.append(addon.NameMD5, MD5_DIGEST_LENGTH); // NameMD5 - MD5 of addon .toc filename without extension
73  _worldPacket.append(addon.VersionMD5, MD5_DIGEST_LENGTH); // VersionMD5 - MD5 of version string declared in addon .toc file
74  _worldPacket << uint32(addon.Timestamp); // LastModified
75  _worldPacket << uint32(1); // Flags
76  }
77  }
79  return &_worldPacket;
80 }
std::list< BannedAddon > const * BannedAddons
Definition: ClientConfigPackets.h:39
Definition: AddonMgr.h:27
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
std::list< ::AddonInfo > const * Addons
Definition: ClientConfigPackets.h:38
void append(T value)
Definition: ByteBuffer.h:143
uint8_t uint8
Definition: g3dmath.h:164
Definition: AddonMgr.h:59
static uint8 const PublicKey[256]
Definition: ClientConfigPackets.h:31
uint32_t uint32
Definition: g3dmath.h:168
Definition: AddonMgr.h:51

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::list< ::AddonInfo> const* WorldPackets::ClientConfig::AddonInfo::Addons = nullptr
std::list<BannedAddon> const* WorldPackets::ClientConfig::AddonInfo::BannedAddons = nullptr
uint8 const AddonInfo::PublicKey
Initial value:
0xC3, 0x5B, 0x50, 0x84, 0xB9, 0x3E, 0x32, 0x42, 0x8C, 0xD0, 0xC7, 0x48, 0xFA, 0x0E, 0x5D, 0x54,
0x5A, 0xA3, 0x0E, 0x14, 0xBA, 0x9E, 0x0D, 0xB9, 0x5D, 0x8B, 0xEE, 0xB6, 0x84, 0x93, 0x45, 0x75,
0xFF, 0x31, 0xFE, 0x2F, 0x64, 0x3F, 0x3D, 0x6D, 0x07, 0xD9, 0x44, 0x9B, 0x40, 0x85, 0x59, 0x34,
0x4E, 0x10, 0xE1, 0xE7, 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, 0x2A, 0xCE, 0x79, 0xC3, 0x9A,
0x0D, 0x36, 0xEA, 0x01, 0xE0, 0xAA, 0x91, 0x20, 0x54, 0xF0, 0x72, 0xD8, 0x1E, 0xC7, 0x89, 0xD2

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