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

#include <ChannelPackets.h>

Public Member Functions

 ChannelPlayerCommand (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

std::string ChannelName
 
std::string Name
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Channel::ChannelPlayerCommand::ChannelPlayerCommand ( WorldPacket &&  packet)
inline
142  : ClientPacket(std::move(packet))
143  {
144  switch (GetOpcode())
145  {
146  default:
147  ABORT();
170  break;
171  }
172  }
Definition: Opcodes.h:181
Definition: Opcodes.h:171
Definition: Opcodes.h:178
Definition: Opcodes.h:173
Definition: Opcodes.h:192
Definition: Opcodes.h:185
Definition: Opcodes.h:188
Definition: Opcodes.h:186
Definition: Opcodes.h:174
Definition: Opcodes.h:176
Definition: Opcodes.h:190
OpcodeClient GetOpcode() const
Definition: Packet.h:72
Definition: Opcodes.h:175
Definition: Opcodes.h:184
Definition: Opcodes.h:180
Definition: Opcodes.h:179
Definition: Opcodes.h:191
Definition: Opcodes.h:187
Definition: Opcodes.h:189
#define ABORT
Definition: Errors.h:56
ClientPacket(WorldPacket &&packet)
Definition: Packet.h:62
Definition: Opcodes.h:183
Definition: Opcodes.h:182
Definition: Opcodes.h:172
Definition: Opcodes.h:177

+ Here is the call graph for this function:

Member Function Documentation

void WorldPackets::Channel::ChannelPlayerCommand::Read ( )
overridevirtual

Implements WorldPackets::Packet.

122 {
123  switch (GetOpcode())
124  {
138  {
139  uint32 channelNameLength = _worldPacket.ReadBits(7);
140  uint32 nameLength = _worldPacket.ReadBits(9);
141  ChannelName = _worldPacket.ReadString(channelNameLength);
142  Name = _worldPacket.ReadString(nameLength);
143  break;
144  }
153  {
155  break;
156  }
158  {
159  uint32 channelNameLength = _worldPacket.ReadBits(7);
160  uint32 nameLength = _worldPacket.ReadBits(7);
161  ChannelName = _worldPacket.ReadString(channelNameLength);
162  Name = _worldPacket.ReadString(nameLength);
163  break;
164  }
165  default:
166  break;
167  }
168 }
Definition: Opcodes.h:181
Definition: Opcodes.h:171
Definition: Opcodes.h:178
uint32 ReadBits(int32 bits)
Definition: ByteBuffer.h:204
Definition: Opcodes.h:173
Definition: Opcodes.h:192
Definition: Opcodes.h:185
WorldPacket _worldPacket
Definition: Packet.h:43
Definition: Opcodes.h:188
Definition: Opcodes.h:186
Definition: Opcodes.h:174
std::string Name
Definition: ChannelPackets.h:177
std::string ChannelName
Definition: ChannelPackets.h:176
Definition: Opcodes.h:176
std::string ReadString(uint32 length)
Definition: ByteBuffer.h:524
Definition: Opcodes.h:190
OpcodeClient GetOpcode() const
Definition: Packet.h:72
uint32_t uint32
Definition: Define.h:150
Definition: Opcodes.h:175
Definition: Opcodes.h:184
Definition: Opcodes.h:180
Definition: Opcodes.h:179
Definition: Opcodes.h:191
Definition: Opcodes.h:187
Definition: Opcodes.h:189
Definition: Opcodes.h:183
Definition: Opcodes.h:182
Definition: Opcodes.h:172
Definition: Opcodes.h:177

Member Data Documentation

std::string WorldPackets::Channel::ChannelPlayerCommand::ChannelName
std::string WorldPackets::Channel::ChannelPlayerCommand::Name

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