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