TrinityCore
WorldPackets::ClientPacket Class Reference

#include <Packet.h>

Public Member Functions

 ClientPacket (WorldPacket &&packet)
 
 ClientPacket (OpcodeClient expectedOpcode, WorldPacket &&packet)
 
WorldPacket const * Write () override final
 
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
 
virtual void Read ()=0
 
WorldPacket const * GetRawPacket () const
 
size_t GetSize () const
 
ConnectionType GetConnection () const
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

◆ ClientPacket() [1/2]

WorldPackets::ClientPacket::ClientPacket ( WorldPacket &&  packet)
40  : Packet(std::move(packet))
41 {
42 }
Packet(WorldPacket &&worldPacket)
Definition: Packet.cpp:21

◆ ClientPacket() [2/2]

WorldPackets::ClientPacket::ClientPacket ( OpcodeClient  expectedOpcode,
WorldPacket &&  packet 
)
35  : Packet(std::move(packet))
36 {
37  ASSERT(GetOpcode() == expectedOpcode);
38 }
OpcodeClient GetOpcode() const
Definition: Packet.h:67
#define ASSERT
Definition: Errors.h:57
Packet(WorldPacket &&worldPacket)
Definition: Packet.cpp:21
+ Here is the call graph for this function:

Member Function Documentation

◆ GetOpcode()

OpcodeClient WorldPackets::ClientPacket::GetOpcode ( ) const
inline
67 { return OpcodeClient(_worldPacket.GetOpcode()); }
WorldPacket _worldPacket
Definition: Packet.h:43
uint32 GetOpcode() const
Definition: WorldPacket.h:83
OpcodeClient
Definition: Opcodes.h:45
+ Here is the caller graph for this function:

◆ Write()

WorldPacket const * WorldPackets::ClientPacket::Write ( )
finaloverridevirtual

Implements WorldPackets::Packet.

45 {
46  ASSERT(!"Write not allowed for client packets.");
47  // Shut up some compilers
48  return nullptr;
49 }
#define ASSERT
Definition: Errors.h:57

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