]>
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 | \r |
19 | #include <string>\r | |
20 | using std::string;\r | |
551b6a1d | 21 | #include <vector>\r |
22 | using std::vector;\r | |
4534c364 | 23 | \r |
77a55fd1 | 24 | #include <boost/date_time/posix_time/posix_time.hpp>\r |
25 | using boost::posix_time::ptime;\r | |
26 | \r | |
4534c364 | 27 | namespace GameServ { namespace GameLayer { namespace GameObjects\r |
28 | {\r | |
29 | class PlayerGO : public GameObject\r | |
30 | {\r | |
31 | public:\r | |
317ce8de | 32 | \r |
551b6a1d | 33 | PlayerGO();\r |
ce4e8c42 | 34 | PlayerGO(const string &Id);\r |
35 | \r | |
36 | virtual ~PlayerGO();\r | |
4534c364 | 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 | |
fd2ef47d | 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 | |
4534c364 | 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 | |
2a8a990d | 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 | |
4534c364 | 67 | \r |
68 | //! Property get - Health\r | |
fadef98f | 69 | unsigned int Health(void) const;\r |
4534c364 | 70 | //! Property set - Health\r |
fadef98f | 71 | void Health(const unsigned int &value);\r |
4534c364 | 72 | \r |
73 | //! Property get - Max Health\r | |
fadef98f | 74 | unsigned int MaxHealth(void) const;\r |
4534c364 | 75 | //! Property set - Max Health\r |
fadef98f | 76 | void MaxHealth(const unsigned int &value);\r |
4534c364 | 77 | \r |
78 | //! Property get - Strength\r | |
fadef98f | 79 | unsigned int Strength(void) const;\r |
4534c364 | 80 | //! Property set - Strength\r |
fadef98f | 81 | void Strength(const unsigned int &value);\r |
4534c364 | 82 | \r |
83 | //! Property get - Defense\r | |
fadef98f | 84 | unsigned int Defense(void) const;\r |
4534c364 | 85 | //! Property set - Defense\r |
fadef98f | 86 | void Defense(const unsigned int &value);\r |
4534c364 | 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 | |
b84b8e7a | 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 | |
4534c364 | 103 | //! Property get - Weapon\r |
33ae7ca7 | 104 | boost::shared_ptr<WeaponGO> Weapon(void) const;\r |
4534c364 | 105 | //! Property set - Weapon\r |
33ae7ca7 | 106 | void Weapon(boost::shared_ptr<WeaponGO> spWeapon);\r |
551b6a1d | 107 | \r |
b84b8e7a | 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 | |
551b6a1d | 113 | //! Property get - Armor\r |
33ae7ca7 | 114 | boost::shared_ptr<ArmorGO> Armor(void) const;\r |
551b6a1d | 115 | //! Property set - Armor\r |
33ae7ca7 | 116 | void Armor(boost::shared_ptr<ArmorGO> spArmor);\r |
4534c364 | 117 | \r |
2a8a990d | 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 | |
77a55fd1 | 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 | |
cb255541 | 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 | |
eec695cf | 139 | \r |
ce4e8c42 | 140 | bool operator==(const PlayerGO &right) const;\r |
141 | bool operator!=(const PlayerGO &right) const;\r | |
142 | \r | |
99c0151e | 143 | virtual PlayerGO *Clone(void) const;\r |
4534c364 | 144 | \r |
1134c368 | 145 | virtual ObjectTypes::ObjectType ObjectType(void) const;\r |
146 | \r | |
4534c364 | 147 | private:\r |
148 | string mName;\r | |
fd2ef47d | 149 | string mfkLevelId;\r |
b84b8e7a | 150 | string mfkWeaponId;\r |
151 | string mfkArmorId;\r | |
fd2ef47d | 152 | unsigned int mLevelNumber;\r |
4534c364 | 153 | unsigned long int mExperience;\r |
154 | unsigned long int mGold;\r | |
2a8a990d | 155 | unsigned long int mBank;\r |
fadef98f | 156 | unsigned int mHealth;\r |
157 | unsigned int mMaxHealth;\r | |
158 | unsigned int mStrength;\r | |
159 | unsigned int mDefense;\r | |
4534c364 | 160 | int mForestFights;\r |
161 | int mPlayerFights;\r | |
162 | string mPassword;\r | |
33ae7ca7 | 163 | boost::shared_ptr<WeaponGO> mWeapon;\r |
164 | boost::shared_ptr<ArmorGO> mArmor;\r | |
77a55fd1 | 165 | ptime mLastLogin;\r |
eec695cf | 166 | \r |
cb255541 | 167 | bool mFoughtMaster;\r |
168 | bool mAlive;\r | |
4534c364 | 169 | };\r |
170 | }}} // GameServ::GameLayer::GameObjects\r | |
171 | #endif |