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