GameServer
PacketSendChat.h
[詳解]
1 
7 #ifndef __PACKETSENDCHAT_H__
8 #define __PACKETSENDCHAT_H__
9 
10 #include "PacketBase.h"
12 #include "PacketID.h"
13 
14 
18 class PacketSendChat : public PacketBase
19 {
20 
21 public:
22 
28  virtual u8 GetPacketID() const { return PacketID::SendChat; }
29 
30  enum ChatType
31  {
33  Say,
36  };
37 
41  std::string Message;
42 
43 
48  {
49  }
50 
54  PacketSendChat(u8 InType, std::string InMessage)
55  {
56  Type = InType;
57  Message = InMessage;
58 
59  }
60 
61 
69  {
70  pStream->Serialize(&Type);
71  pStream->Serialize(&Message);
72 
73  return true;
74  }
75 };
76 
77 #endif // #ifndef __PACKETSENDCHAT_H__
ChatType
Definition: PacketSendChat.h:30
virtual u8 GetPacketID() const
パケットID取得.
Definition: PacketSendChat.h:28
bool Serialize(MemoryStreamInterface *pStream)
シリアライズ
Definition: PacketSendChat.h:68
unsigned char u8
Definition: TypeDefs.h:6
u8 Type
タイプ
Definition: PacketSendChat.h:39
virtual bool Serialize(s32 *pValue)=0
Say
Definition: PacketSendChat.h:33
チャット送信パケット
Definition: PacketSendChat.h:18
Shout
Definition: PacketSendChat.h:35
チャット送信パケット
Definition: PacketID.h:43
std::string Message
メッセージ
Definition: PacketSendChat.h:41
PacketSendChat()
コンストラクタ
Definition: PacketSendChat.h:47
Definition: PacketBase.h:9
Definition: MemoryStreamInterface.h:8
PacketSendChat(u8 InType, std::string InMessage)
コンストラクタ
Definition: PacketSendChat.h:54