]>
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 | |
4534c364 | 14 | #include <boost/shared_ptr.hpp>\r |
15 | using boost::shared_ptr;\r | |
16 | \r | |
17 | #include <string>\r | |
18 | using std::string;\r | |
551b6a1d | 19 | #include <vector>\r |
20 | using std::vector;\r | |
4534c364 | 21 | \r |
22 | namespace GameServ { namespace GameLayer { namespace GameObjects\r | |
23 | {\r | |
24 | class PlayerGO : public GameObject\r | |
25 | {\r | |
26 | public:\r | |
551b6a1d | 27 | PlayerGO();\r |
ce4e8c42 | 28 | PlayerGO(const string &Id);\r |
29 | \r | |
30 | virtual ~PlayerGO();\r | |
4534c364 | 31 | \r |
32 | //! Property get - Name\r | |
33 | string Name(void) const;\r | |
34 | //! Property set - Name\r | |
35 | void Name(const string &value);\r | |
36 | \r | |
37 | //! Property get - Level\r | |
38 | int Level(void) const;\r | |
39 | //! Property set - Level\r | |
40 | void Level(const int &value);\r | |
41 | \r | |
42 | //! Property get - Experience\r | |
43 | unsigned long int Experience(void) const;\r | |
44 | //! Property set - Experience\r | |
45 | void Experience(const unsigned long int &value);\r | |
46 | \r | |
47 | //! Property get - Gold\r | |
48 | unsigned long int Gold(void) const;\r | |
49 | //! Property set - Gold\r | |
2a8a990d | 50 | void Gold(const unsigned long int &value);\r |
51 | \r | |
52 | //! Property get - Gold in the bank\r | |
53 | unsigned long int Bank(void) const;\r | |
54 | //! Property set - Gold in the bank\r | |
55 | void Bank(const unsigned long int &value);\r | |
4534c364 | 56 | \r |
57 | //! Property get - Health\r | |
58 | int Health(void) const;\r | |
59 | //! Property set - Health\r | |
60 | void Health(const int &value);\r | |
61 | \r | |
62 | //! Property get - Max Health\r | |
63 | int MaxHealth(void) const;\r | |
64 | //! Property set - Max Health\r | |
65 | void MaxHealth(const int &value);\r | |
66 | \r | |
67 | //! Property get - Strength\r | |
68 | int Strength(void) const;\r | |
69 | //! Property set - Strength\r | |
70 | void Strength(const int &value);\r | |
71 | \r | |
72 | //! Property get - Defense\r | |
73 | int Defense(void) const;\r | |
74 | //! Property set - Defense\r | |
75 | void Defense(const int &value);\r | |
76 | \r | |
77 | //! Property get - Forest Fights\r | |
78 | int ForestFights(void) const;\r | |
79 | //! Propety set - Forest Fights\r | |
80 | void ForestFights(const int &value);\r | |
81 | \r | |
82 | //! Property get - Player Fights\r | |
83 | int PlayerFights(void) const;\r | |
84 | //! Property set - Player Fights\r | |
85 | void PlayerFights(const int &value);\r | |
86 | \r | |
87 | //! Property get - Weapon\r | |
88 | shared_ptr<WeaponGO> Weapon(void) const;\r | |
89 | //! Property set - Weapon\r | |
551b6a1d | 90 | void Weapon(shared_ptr<WeaponGO> spWeapon);\r |
91 | \r | |
92 | //! Property get - Armor\r | |
93 | shared_ptr<ArmorGO> Armor(void) const;\r | |
94 | //! Property set - Armor\r | |
95 | void Armor(shared_ptr<ArmorGO> spArmor);\r | |
4534c364 | 96 | \r |
551b6a1d | 97 | //! Use an Item\r |
98 | void Use(shared_ptr<ItemGO> spItem);\r | |
ce4e8c42 | 99 | //! Undo the effects of an item\r |
100 | void Undo(shared_ptr<ItemGO> spItem);\r | |
101 | \r | |
2a8a990d | 102 | //! Property set - Password\r |
103 | void Password(const string &value);\r | |
104 | //! Property get - Password\r | |
105 | string Password(void) const;\r | |
106 | \r | |
ce4e8c42 | 107 | bool operator==(const PlayerGO &right) const;\r |
108 | bool operator!=(const PlayerGO &right) const;\r | |
109 | \r | |
110 | virtual PlayerGO *Clone(void) const;\r | |
4534c364 | 111 | \r |
112 | private:\r | |
113 | string mName;\r | |
114 | int mLevel;\r | |
115 | unsigned long int mExperience;\r | |
116 | unsigned long int mGold;\r | |
2a8a990d | 117 | unsigned long int mBank;\r |
4534c364 | 118 | int mHealth;\r |
119 | int mMaxHealth;\r | |
120 | int mStrength;\r | |
121 | int mDefense;\r | |
122 | int mForestFights;\r | |
123 | int mPlayerFights;\r | |
124 | string mPassword;\r | |
125 | shared_ptr<WeaponGO> mWeapon;\r | |
126 | shared_ptr<ArmorGO> mArmor;\r | |
551b6a1d | 127 | vector< shared_ptr<ItemGO> > mInventory;\r |
4534c364 | 128 | \r |
129 | };\r | |
130 | }}} // GameServ::GameLayer::GameObjects\r | |
131 | #endif |