GameServer
PacketReceiveChat.h
[詳解]
1 
7 #ifndef __PACKETRECEIVECHAT_H__
8 #define __PACKETRECEIVECHAT_H__
9 
10 #include "PacketBase.h"
12 #include "PacketID.h"
13 
14 
19 {
20 
21 public:
22 
28  virtual u8 GetPacketID() const { return PacketID::ReceiveChat; }
29 
30 
31 
35  std::string Name;
37  std::string Message;
38 
39 
44  {
45  }
46 
50  PacketReceiveChat(u32 InUuid, std::string InName, std::string InMessage)
51  {
52  Uuid = InUuid;
53  Name = InName;
54  Message = InMessage;
55 
56  }
57 
58 
66  {
67  pStream->Serialize(&Uuid);
68  pStream->Serialize(&Name);
69  pStream->Serialize(&Message);
70 
71  return true;
72  }
73 };
74 
75 #endif // #ifndef __PACKETRECEIVECHAT_H__
チャット受信パケット
Definition: PacketID.h:45
unsigned char u8
Definition: TypeDefs.h:6
std::string Message
メッセージ
Definition: PacketReceiveChat.h:37
PacketReceiveChat()
コンストラクタ
Definition: PacketReceiveChat.h:43
virtual u8 GetPacketID() const
パケットID取得.
Definition: PacketReceiveChat.h:28
virtual bool Serialize(s32 *pValue)=0
unsigned int u32
Definition: TypeDefs.h:10
PacketReceiveChat(u32 InUuid, std::string InName, std::string InMessage)
コンストラクタ
Definition: PacketReceiveChat.h:50
Definition: PacketBase.h:9
Definition: MemoryStreamInterface.h:8
チャット受信パケット
Definition: PacketReceiveChat.h:18
u32 Uuid
UUID
Definition: PacketReceiveChat.h:33
std::string Name
キャラクタ名
Definition: PacketReceiveChat.h:35
bool Serialize(MemoryStreamInterface *pStream)
シリアライズ
Definition: PacketReceiveChat.h:65