]>
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/shared_ptr.hpp>
15 using boost::shared_ptr
;
22 namespace GameServ
{ namespace GameLayer
{ namespace GameObjects
24 class PlayerGO
: public GameObject
28 PlayerGO(const string
&Id
);
32 //! Property get - Name
33 string
Name(void) const;
34 //! Property set - Name
35 void Name(const string
&value
);
37 //! Property get - Level
38 int Level(void) const;
39 //! Property set - Level
40 void Level(const int &value
);
42 //! Property get - Experience
43 unsigned long int Experience(void) const;
44 //! Property set - Experience
45 void Experience(const unsigned long int &value
);
47 //! Property get - Gold
48 unsigned long int Gold(void) const;
49 //! Property set - Gold
50 void Gold(const unsigned long int &gold
);
52 //! Property get - Health
53 int Health(void) const;
54 //! Property set - Health
55 void Health(const int &value
);
57 //! Property get - Max Health
58 int MaxHealth(void) const;
59 //! Property set - Max Health
60 void MaxHealth(const int &value
);
62 //! Property get - Strength
63 int Strength(void) const;
64 //! Property set - Strength
65 void Strength(const int &value
);
67 //! Property get - Defense
68 int Defense(void) const;
69 //! Property set - Defense
70 void Defense(const int &value
);
72 //! Property get - Forest Fights
73 int ForestFights(void) const;
74 //! Propety set - Forest Fights
75 void ForestFights(const int &value
);
77 //! Property get - Player Fights
78 int PlayerFights(void) const;
79 //! Property set - Player Fights
80 void PlayerFights(const int &value
);
82 //! Property get - Weapon
83 shared_ptr
<WeaponGO
> Weapon(void) const;
84 //! Property set - Weapon
85 void Weapon(shared_ptr
<WeaponGO
> spWeapon
);
87 //! Property get - Armor
88 shared_ptr
<ArmorGO
> Armor(void) const;
89 //! Property set - Armor
90 void Armor(shared_ptr
<ArmorGO
> spArmor
);
93 void Use(shared_ptr
<ItemGO
> spItem
);
94 //! Undo the effects of an item
95 void Undo(shared_ptr
<ItemGO
> spItem
);
97 bool operator==(const PlayerGO
&right
) const;
98 bool operator!=(const PlayerGO
&right
) const;
100 virtual PlayerGO
*Clone(void) const;
105 unsigned long int mExperience
;
106 unsigned long int mGold
;
114 shared_ptr
<WeaponGO
> mWeapon
;
115 shared_ptr
<ArmorGO
> mArmor
;
116 vector
< shared_ptr
<ItemGO
> > mInventory
;
119 }}} // GameServ::GameLayer::GameObjects