GameServer
PacketLevelUp.h
[詳解]
1 
7 #ifndef __PACKETLEVELUP_H__
8 #define __PACKETLEVELUP_H__
9 
10 #include "PacketBase.h"
12 #include "PacketID.h"
13 
14 
18 class PacketLevelUp : public PacketBase
19 {
20 
21 public:
22 
28  virtual u8 GetPacketID() const { return PacketID::LevelUp; }
29 
30 
31 
50 
51 
56  {
57  }
58 
62  PacketLevelUp(u32 InLevel, u32 InMaxHp, u32 InBaseMaxHp, u32 InStr, u32 InDef, u32 InInt, u32 InMnd, u32 InVit, s32 InResultExp)
63  {
64  Level = InLevel;
65  MaxHp = InMaxHp;
66  BaseMaxHp = InBaseMaxHp;
67  Str = InStr;
68  Def = InDef;
69  Int = InInt;
70  Mnd = InMnd;
71  Vit = InVit;
72  ResultExp = InResultExp;
73 
74  }
75 
76 
84  {
85  pStream->Serialize(&Level);
86  pStream->Serialize(&MaxHp);
87  pStream->Serialize(&BaseMaxHp);
88  pStream->Serialize(&Str);
89  pStream->Serialize(&Def);
90  pStream->Serialize(&Int);
91  pStream->Serialize(&Mnd);
92  pStream->Serialize(&Vit);
93  pStream->Serialize(&ResultExp);
94 
95  return true;
96  }
97 };
98 
99 #endif // #ifndef __PACKETLEVELUP_H__
レベルアップパケット
Definition: PacketID.h:63
unsigned char u8
Definition: TypeDefs.h:6
u32 Mnd
MND
Definition: PacketLevelUp.h:45
u32 Vit
VIT
Definition: PacketLevelUp.h:47
PacketLevelUp()
コンストラクタ
Definition: PacketLevelUp.h:55
u32 BaseMaxHp
基礎最大HP
Definition: PacketLevelUp.h:37
u32 Level
レベル
Definition: PacketLevelUp.h:33
u32 Str
STR
Definition: PacketLevelUp.h:39
virtual bool Serialize(s32 *pValue)=0
s32 ResultExp
経験値
Definition: PacketLevelUp.h:49
u32 Int
INT
Definition: PacketLevelUp.h:43
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
u32 Def
DEF
Definition: PacketLevelUp.h:41
PacketLevelUp(u32 InLevel, u32 InMaxHp, u32 InBaseMaxHp, u32 InStr, u32 InDef, u32 InInt, u32 InMnd, u32 InVit, s32 InResultExp)
コンストラクタ
Definition: PacketLevelUp.h:62
bool Serialize(MemoryStreamInterface *pStream)
シリアライズ
Definition: PacketLevelUp.h:83
Definition: PacketBase.h:9
u32 MaxHp
最大HP
Definition: PacketLevelUp.h:35
Definition: MemoryStreamInterface.h:8
virtual u8 GetPacketID() const
パケットID取得.
Definition: PacketLevelUp.h:28
レベルアップパケット
Definition: PacketLevelUp.h:18