]> jfr.im git - irc/gameservirc.git/blame_incremental - gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h
Added the asio framework to start developing a GameServ server
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / include / GameServ / GameLayer / GameObjects / PlayerGO.h
... / ...
CommitLineData
1#ifndef __GS__PLAYER_H__\r
2#define __GS__PLAYER_H__\r
3#include <GameServ/GameLayer/GameObjects/GameObject.h>\r
4using GameServ::GameLayer::GameObjects::GameObject;\r
5\r
6#include <GameServ/GameLayer/GameObjects/ItemGO.h>\r
7using GameServ::GameLayer::GameObjects::ItemGO;\r
8\r
9#include <GameServ/GameLayer/GameObjects/ArmorGO.h>\r
10using GameServ::GameLayer::GameObjects::ArmorGO;\r
11#include <GameServ/GameLayer/GameObjects/WeaponGO.h>\r
12using GameServ::GameLayer::GameObjects::WeaponGO;\r
13\r
14#include <GameServ/Types.h>\r
15using GameServ::Types::ObjectTypes;\r
16\r
17#include <boost/smart_ptr/shared_ptr.hpp>\r
18\r
19#include <string>\r
20using std::string;\r
21#include <vector>\r
22using std::vector;\r
23\r
24#include <boost/date_time/posix_time/posix_time.hpp>\r
25using boost::posix_time::ptime;\r
26\r
27namespace GameServ { namespace GameLayer { namespace GameObjects\r
28{\r
29 class PlayerGO : public GameObject\r
30 {\r
31 public:\r
32\r
33 PlayerGO();\r
34 PlayerGO(const string &Id);\r
35\r
36 virtual ~PlayerGO();\r
37\r
38 //! Property get - Name\r
39 string Name(void) const;\r
40 //! Property set - Name\r
41 void Name(const string &value);\r
42\r
43 //! Property get - LevelId\r
44 string LevelId(void) const;\r
45 //! Property set - LevelId\r
46 void LevelId(const string &value);\r
47\r
48 //! Property get - LevelNumber\r
49 unsigned int LevelNumber(void) const;\r
50 //! Property set - LevelNumber\r
51 void LevelNumber(const unsigned int &value);\r
52\r
53 //! Property get - Experience\r
54 unsigned long int Experience(void) const;\r
55 //! Property set - Experience\r
56 void Experience(const unsigned long int &value);\r
57\r
58 //! Property get - Gold\r
59 unsigned long int Gold(void) const;\r
60 //! Property set - Gold\r
61 void Gold(const unsigned long int &value);\r
62\r
63 //! Property get - Gold in the bank\r
64 unsigned long int Bank(void) const;\r
65 //! Property set - Gold in the bank\r
66 void Bank(const unsigned long int &value);\r
67\r
68 //! Property get - Health\r
69 unsigned int Health(void) const;\r
70 //! Property set - Health\r
71 void Health(const unsigned int &value);\r
72\r
73 //! Property get - Max Health\r
74 unsigned int MaxHealth(void) const;\r
75 //! Property set - Max Health\r
76 void MaxHealth(const unsigned int &value);\r
77\r
78 //! Property get - Strength\r
79 unsigned int Strength(void) const;\r
80 //! Property set - Strength\r
81 void Strength(const unsigned int &value);\r
82\r
83 //! Property get - Defense\r
84 unsigned int Defense(void) const;\r
85 //! Property set - Defense\r
86 void Defense(const unsigned int &value);\r
87\r
88 //! Property get - Forest Fights\r
89 int ForestFights(void) const;\r
90 //! Propety set - Forest Fights\r
91 void ForestFights(const int &value);\r
92\r
93 //! Property get - Player Fights\r
94 int PlayerFights(void) const;\r
95 //! Property set - Player Fights\r
96 void PlayerFights(const int &value);\r
97\r
98 //! Property get - Weapon Id\r
99 string WeaponId(void) const;\r
100 //! Property set - Weapon Id\r
101 void WeaponId(const string &value);\r
102\r
103 //! Property get - Weapon\r
104 boost::shared_ptr<WeaponGO> Weapon(void) const;\r
105 //! Property set - Weapon\r
106 void Weapon(boost::shared_ptr<WeaponGO> spWeapon);\r
107\r
108 //! Property get - ArmorId\r
109 string ArmorId(void) const;\r
110 //! Property set - ArmorId\r
111 void ArmorId(const string &value);\r
112\r
113 //! Property get - Armor\r
114 boost::shared_ptr<ArmorGO> Armor(void) const;\r
115 //! Property set - Armor\r
116 void Armor(boost::shared_ptr<ArmorGO> spArmor);\r
117\r
118 //! Property set - Password\r
119 void Password(const string &value);\r
120 //! Property get - Password\r
121 string Password(void) const;\r
122\r
123 //! Property set - LastLogin\r
124 void LastLogin(const ptime &value);\r
125 //! Property get - LastLogin\r
126 ptime LastLogin(void) const;\r
127\r
128 //! Property get - FoughtMaster\r
129 bool FoughtMaster(void) const;\r
130\r
131 //! Property set - Fought master\r
132 void FoughtMaster(const bool &value);\r
133\r
134 //! Property get - Alive\r
135 bool Alive(void) const;\r
136\r
137 //! Property set - Alive\r
138 void Alive(const bool &value);\r
139\r
140 bool operator==(const PlayerGO &right) const;\r
141 bool operator!=(const PlayerGO &right) const;\r
142\r
143 virtual PlayerGO *Clone(void) const;\r
144\r
145 virtual ObjectTypes::ObjectType ObjectType(void) const;\r
146\r
147 private:\r
148 string mName;\r
149 string mfkLevelId;\r
150 string mfkWeaponId;\r
151 string mfkArmorId;\r
152 unsigned int mLevelNumber;\r
153 unsigned long int mExperience;\r
154 unsigned long int mGold;\r
155 unsigned long int mBank;\r
156 unsigned int mHealth;\r
157 unsigned int mMaxHealth;\r
158 unsigned int mStrength;\r
159 unsigned int mDefense;\r
160 int mForestFights;\r
161 int mPlayerFights;\r
162 string mPassword;\r
163 boost::shared_ptr<WeaponGO> mWeapon;\r
164 boost::shared_ptr<ArmorGO> mArmor;\r
165 ptime mLastLogin;\r
166\r
167 bool mFoughtMaster;\r
168 bool mAlive;\r
169 };\r
170}}} // GameServ::GameLayer::GameObjects\r
171#endif