]>
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 <boost/smart_ptr/shared_ptr.hpp>
15 using boost::shared_ptr
;
23 #include <boost/date_time/posix_time/posix_time.hpp>
24 using boost::posix_time::ptime
;
26 namespace GameServ
{ namespace GameLayer
{ namespace GameObjects
28 class PlayerGO
: public GameObject
32 PlayerGO(const string
&Id
);
36 //! Property get - Name
37 string
Name(void) const;
38 //! Property set - Name
39 void Name(const string
&value
);
41 //! Property get - Level
42 int Level(void) const;
43 //! Property set - Level
44 void Level(const int &value
);
46 //! Property get - Experience
47 unsigned long int Experience(void) const;
48 //! Property set - Experience
49 void Experience(const unsigned long int &value
);
51 //! Property get - Gold
52 unsigned long int Gold(void) const;
53 //! Property set - Gold
54 void Gold(const unsigned long int &value
);
56 //! Property get - Gold in the bank
57 unsigned long int Bank(void) const;
58 //! Property set - Gold in the bank
59 void Bank(const unsigned long int &value
);
61 //! Property get - Health
62 int Health(void) const;
63 //! Property set - Health
64 void Health(const int &value
);
66 //! Property get - Max Health
67 int MaxHealth(void) const;
68 //! Property set - Max Health
69 void MaxHealth(const int &value
);
71 //! Property get - Strength
72 int Strength(void) const;
73 //! Property set - Strength
74 void Strength(const int &value
);
76 //! Property get - Defense
77 int Defense(void) const;
78 //! Property set - Defense
79 void Defense(const int &value
);
81 //! Property get - Forest Fights
82 int ForestFights(void) const;
83 //! Propety set - Forest Fights
84 void ForestFights(const int &value
);
86 //! Property get - Player Fights
87 int PlayerFights(void) const;
88 //! Property set - Player Fights
89 void PlayerFights(const int &value
);
91 //! Property get - Weapon
92 shared_ptr
<WeaponGO
> Weapon(void) const;
93 //! Property set - Weapon
94 void Weapon(shared_ptr
<WeaponGO
> spWeapon
);
96 //! Property get - Armor
97 shared_ptr
<ArmorGO
> Armor(void) const;
98 //! Property set - Armor
99 void Armor(shared_ptr
<ArmorGO
> spArmor
);
102 void Use(shared_ptr
<ItemGO
> spItem
);
103 //! Undo the effects of an item
104 void Undo(shared_ptr
<ItemGO
> spItem
);
106 //! Property set - Password
107 void Password(const string
&value
);
108 //! Property get - Password
109 string
Password(void) const;
111 //! Property set - LastLogin
112 void LastLogin(const ptime
&value
);
113 //! Property get - LastLogin
114 ptime
LastLogin(void) const;
116 //! Property get - FoughtMaster
117 bool FoughtMaster(void) const;
119 //! Property set - Fought master
120 void FoughtMaster(const bool &value
);
122 //! Property get - Alive
123 bool Alive(void) const;
125 //! Property set - Alive
126 void Alive(const bool &value
);
128 bool operator==(const PlayerGO
&right
) const;
129 bool operator!=(const PlayerGO
&right
) const;
131 virtual PlayerGO
*Clone(void) const;
136 unsigned long int mExperience
;
137 unsigned long int mGold
;
138 unsigned long int mBank
;
146 shared_ptr
<WeaponGO
> mWeapon
;
147 shared_ptr
<ArmorGO
> mArmor
;
148 vector
< shared_ptr
<ItemGO
> > mInventory
;
154 }}} // GameServ::GameLayer::GameObjects