18 #ifndef PacketBaseWorld_h__
19 #define PacketBaseWorld_h__
30 virtual ~
Packet() =
default;
36 virtual void Read() = 0;
39 size_t GetSize()
const {
return _worldPacket.size(); }
51 void Read() override final {
ASSERT(!
"Read not implemented for server packets."); }
67 ASSERT(!
"Write not allowed for client packets.");
76 #endif // PacketBaseWorld_h__
ConnectionType GetConnection() const
Definition: Packet.h:40
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
uint32 GetOpcode() const
Definition: WorldPacket.h:79
WorldPacket _worldPacket
Definition: Packet.h:43
void Clear()
Definition: Packet.h:53
OpcodeServer GetOpcode() const
Definition: Packet.h:56
OpcodeServer
Definition: Opcodes.h:725
void Read() overridefinal
Definition: Packet.h:51
WorldPacket const * GetRawPacket() const
Definition: Packet.h:38
Vector2int16 & operator=(const Any &a)
OpcodeClient GetOpcode() const
Definition: Packet.h:72
Definition: BattlegroundMgr.h:57
size_t GetSize() const
Definition: Packet.h:39
#define TC_GAME_API
Definition: Define.h:134
#define ASSERT
Definition: Errors.h:55
OpcodeClient
Definition: Opcodes.h:46
ClientPacket(WorldPacket &&packet)
Definition: Packet.h:62
ClientPacket(OpcodeClient expectedOpcode, WorldPacket &&packet)
Definition: Packet.h:63
void clear()
Definition: ByteBuffer.h:134
Definition: WorldPacket.h:26
Packet(WorldPacket &&worldPacket)
Definition: Packet.h:28
ConnectionType
Definition: Opcodes.h:29
WorldPacket && Move()
Definition: Packet.h:54
WorldPacket const * Write() overridefinal
Definition: Packet.h:65