GameServer
PacketHeal.h
[詳解]
1 
7 #ifndef __PACKETHEAL_H__
8 #define __PACKETHEAL_H__
9 
10 #include "PacketBase.h"
12 #include "PacketID.h"
13 
14 
18 class PacketHeal : public PacketBase
19 {
20 
21 public:
22 
28  virtual u8 GetPacketID() const { return PacketID::Heal; }
29 
30 
31 
40 
41 
46  {
47  }
48 
52  PacketHeal(u8 InTargetType, u32 InTargetUuid, s32 InHealValue, s32 InResultHp)
53  {
54  TargetType = InTargetType;
55  TargetUuid = InTargetUuid;
56  HealValue = InHealValue;
57  ResultHp = InResultHp;
58 
59  }
60 
61 
69  {
70  pStream->Serialize(&TargetType);
71  pStream->Serialize(&TargetUuid);
72  pStream->Serialize(&HealValue);
73  pStream->Serialize(&ResultHp);
74 
75  return true;
76  }
77 };
78 
79 #endif // #ifndef __PACKETHEAL_H__
unsigned char u8
Definition: TypeDefs.h:6
PacketHeal(u8 InTargetType, u32 InTargetUuid, s32 InHealValue, s32 InResultHp)
コンストラクタ
Definition: PacketHeal.h:52
virtual bool Serialize(s32 *pValue)=0
bool Serialize(MemoryStreamInterface *pStream)
シリアライズ
Definition: PacketHeal.h:68
s32 ResultHp
回復後のHP
Definition: PacketHeal.h:39
u32 TargetUuid
ターゲットのUUID
Definition: PacketHeal.h:35
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
回復パケット
Definition: PacketHeal.h:18
u8 TargetType
ターゲットタイプ
Definition: PacketHeal.h:33
回復パケット
Definition: PacketID.h:37
s32 HealValue
回復量
Definition: PacketHeal.h:37
Definition: PacketBase.h:9
virtual u8 GetPacketID() const
パケットID取得.
Definition: PacketHeal.h:28
Definition: MemoryStreamInterface.h:8
PacketHeal()
コンストラクタ
Definition: PacketHeal.h:45