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

#include <SystemPackets.h>

Public Member Functions

 MOTD ()
 
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::vector< std::string > constText = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::System::MOTD::MOTD ( )
inline
112 : ServerPacket(SMSG_MOTD) { }
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1223

Member Function Documentation

WorldPacket const * WorldPackets::System::MOTD::Write ( )
overridevirtual

Implements WorldPackets::Packet.

106 {
107  ASSERT(Text);
108  _worldPacket.WriteBits(Text->size(), 4);
110 
111  for (std::string const& line : *Text)
112  {
113  _worldPacket.WriteBits(line.length(), 7);
116  }
117 
118  return &_worldPacket;
119 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
Text
Definition: boss_ascendant_lord_obsidius.cpp:22
#define ASSERT
Definition: Errors.h:55
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<std::string> const* WorldPackets::System::MOTD::Text = nullptr

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