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