GameServer
PlayerData.h
[詳解]
1 
7 #ifndef __PLAYERDATA_H__
8 #define __PLAYERDATA_H__
9 
10 #include "PacketBase.h"
12 
13 
17 class PlayerData
18 {
19 
20 public:
21 
31  u32 Uuid;
34  float X;
36  float Y;
38  float Z;
40  float Rotation;
46  std::string Name;
49 
50 
55  {
56  }
57 
61  PlayerData(u32 InUuid, float InX, float InY, float InZ, float InRotation, s32 InHp, s32 InMaxHp, std::string InName, u8 InJob)
62  {
63  Uuid = InUuid;
64  X = InX;
65  Y = InY;
66  Z = InZ;
67  Rotation = InRotation;
68  Hp = InHp;
69  MaxHp = InMaxHp;
70  Name = InName;
71  Job = InJob;
72 
73  }
74 
75 
83  {
84  pStream->Serialize(&Uuid);
85  pStream->Serialize(&X);
86  pStream->Serialize(&Y);
87  pStream->Serialize(&Z);
88  pStream->Serialize(&Rotation);
89  pStream->Serialize(&Hp);
90  pStream->Serialize(&MaxHp);
91  pStream->Serialize(&Name);
92  pStream->Serialize(&Job);
93 
94  return true;
95  }
96 };
97 
98 #endif // #ifndef __PLAYERDATA_H__
unsigned char u8
Definition: TypeDefs.h:6
Definition: Rotation.h:5
PlayerData()
コンストラクタ
Definition: PlayerData.h:54
u32 Uuid
UUID
Definition: PlayerData.h:32
s32 MaxHp
最大HP
Definition: PlayerData.h:44
virtual bool Serialize(s32 *pValue)=0
PlayerData(u32 InUuid, float InX, float InY, float InZ, float InRotation, s32 InHp, s32 InMaxHp, std::string InName, u8 InJob)
コンストラクタ
Definition: PlayerData.h:61
float Y
Y座標
Definition: PlayerData.h:36
u8 Job
ジョブ
Definition: PlayerData.h:48
s32 Hp
HP
Definition: PlayerData.h:42
bool Serialize(MemoryStreamInterface *pStream)
シリアライズ
Definition: PlayerData.h:82
int s32
Definition: TypeDefs.h:9
unsigned int u32
Definition: TypeDefs.h:10
float Rotation
回転
Definition: PlayerData.h:40
float X
X座標
Definition: PlayerData.h:34
プレイヤーデータパケット
Definition: PlayerData.h:17
float Z
Z座標
Definition: PlayerData.h:38
Definition: MemoryStreamInterface.h:8
std::string Name
名前
Definition: PlayerData.h:46