]>
jfr.im git - irc/gameservirc.git/blob - 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
;
6 #include <GameServ/GameLayer/GameObjects/ItemGO.h>
7 using GameServ::GameLayer::GameObjects::ItemGO
;
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
;
14 #include <GameServ/Types.h>
15 using GameServ::Types::ObjectTypes
;
17 #include <boost/smart_ptr/shared_ptr.hpp>
18 using boost::shared_ptr
;
25 #include <boost/date_time/posix_time/posix_time.hpp>
26 using boost::posix_time::ptime
;
28 namespace GameServ
{ namespace GameLayer
{ namespace GameObjects
30 class PlayerGO
: public GameObject
35 PlayerGO(const string
&Id
);
39 //! Property get - Name
40 string
Name(void) const;
41 //! Property set - Name
42 void Name(const string
&value
);
44 //! Property get - LevelId
45 string
LevelId(void) const;
46 //! Property set - LevelId
47 void LevelId(const string
&value
);
49 //! Property get - LevelNumber
50 unsigned int LevelNumber(void) const;
51 //! Property set - LevelNumber
52 void LevelNumber(const unsigned int &value
);
54 //! Property get - Experience
55 unsigned long int Experience(void) const;
56 //! Property set - Experience
57 void Experience(const unsigned long int &value
);
59 //! Property get - Gold
60 unsigned long int Gold(void) const;
61 //! Property set - Gold
62 void Gold(const unsigned long int &value
);
64 //! Property get - Gold in the bank
65 unsigned long int Bank(void) const;
66 //! Property set - Gold in the bank
67 void Bank(const unsigned long int &value
);
69 //! Property get - Health
70 unsigned int Health(void) const;
71 //! Property set - Health
72 void Health(const unsigned int &value
);
74 //! Property get - Max Health
75 unsigned int MaxHealth(void) const;
76 //! Property set - Max Health
77 void MaxHealth(const unsigned int &value
);
79 //! Property get - Strength
80 unsigned int Strength(void) const;
81 //! Property set - Strength
82 void Strength(const unsigned int &value
);
84 //! Property get - Defense
85 unsigned int Defense(void) const;
86 //! Property set - Defense
87 void Defense(const unsigned int &value
);
89 //! Property get - Forest Fights
90 int ForestFights(void) const;
91 //! Propety set - Forest Fights
92 void ForestFights(const int &value
);
94 //! Property get - Player Fights
95 int PlayerFights(void) const;
96 //! Property set - Player Fights
97 void PlayerFights(const int &value
);
99 //! Property get - Weapon
100 shared_ptr
<WeaponGO
> Weapon(void) const;
101 //! Property set - Weapon
102 void Weapon(shared_ptr
<WeaponGO
> spWeapon
);
104 //! Property get - Armor
105 shared_ptr
<ArmorGO
> Armor(void) const;
106 //! Property set - Armor
107 void Armor(shared_ptr
<ArmorGO
> spArmor
);
109 //! Property set - Password
110 void Password(const string
&value
);
111 //! Property get - Password
112 string
Password(void) const;
114 //! Property set - LastLogin
115 void LastLogin(const ptime
&value
);
116 //! Property get - LastLogin
117 ptime
LastLogin(void) const;
119 //! Property get - FoughtMaster
120 bool FoughtMaster(void) const;
122 //! Property set - Fought master
123 void FoughtMaster(const bool &value
);
125 //! Property get - Alive
126 bool Alive(void) const;
128 //! Property set - Alive
129 void Alive(const bool &value
);
131 bool operator==(const PlayerGO
&right
) const;
132 bool operator!=(const PlayerGO
&right
) const;
134 virtual PlayerGO
*Clone(void) const;
136 virtual ObjectTypes::ObjectType
ObjectType(void) const;
141 unsigned int mLevelNumber
;
142 unsigned long int mExperience
;
143 unsigned long int mGold
;
144 unsigned long int mBank
;
145 unsigned int mHealth
;
146 unsigned int mMaxHealth
;
147 unsigned int mStrength
;
148 unsigned int mDefense
;
152 shared_ptr
<WeaponGO
> mWeapon
;
153 shared_ptr
<ArmorGO
> mArmor
;
159 }}} // GameServ::GameLayer::GameObjects