X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/2a8a990d4fa6ac97facf720f28bfcb2c70acbfe0..8e6e952d414758bf35813c1fd2ce9ccdba5bcd35:/gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h diff --git a/gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h b/gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h index 2c16885..4f160cb 100644 --- a/gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h +++ b/gameserv-2.0/libgameservgldl/include/GameServ/GameLayer/GameObjects/PlayerGO.h @@ -11,7 +11,7 @@ using GameServ::GameLayer::GameObjects::ArmorGO; #include using GameServ::GameLayer::GameObjects::WeaponGO; -#include +#include using boost::shared_ptr; #include @@ -19,11 +19,15 @@ using std::string; #include using std::vector; +#include +using boost::posix_time::ptime; + namespace GameServ { namespace GameLayer { namespace GameObjects { class PlayerGO : public GameObject { public: + PlayerGO(); PlayerGO(const string &Id); @@ -94,16 +98,39 @@ namespace GameServ { namespace GameLayer { namespace GameObjects //! Property set - Armor void Armor(shared_ptr spArmor); - //! Use an Item - void Use(shared_ptr spItem); - //! Undo the effects of an item - void Undo(shared_ptr spItem); - //! Property set - Password void Password(const string &value); //! Property get - Password string Password(void) const; + //! Property set - LastLogin + void LastLogin(const ptime &value); + //! Property get - LastLogin + ptime LastLogin(void) const; + + //! Property get - FoughtMaster + bool FoughtMaster(void) const; + + //! Property set - Fought master + void FoughtMaster(const bool &value); + + //! Property get - Alive + bool Alive(void) const; + + //! Property set - Alive + void Alive(const bool &value); + + //! Property set - Inventory + void Inventory(const vector< shared_ptr > &items); + + //! Property get - Inventory + vector< shared_ptr > Inventory(void) const; + + //! Add item to inventory + void AddItemToInventory(shared_ptr spItem, const int &Number=1); + //! Remove item from inventory + void RemoveItemFromInventory(shared_ptr spItem, const int &Number=1); + bool operator==(const PlayerGO &right) const; bool operator!=(const PlayerGO &right) const; @@ -124,8 +151,12 @@ namespace GameServ { namespace GameLayer { namespace GameObjects string mPassword; shared_ptr mWeapon; shared_ptr mArmor; - vector< shared_ptr > mInventory; + ptime mLastLogin; + + bool mFoughtMaster; + bool mAlive; + vector< shared_ptr > mItems; }; }}} // GameServ::GameLayer::GameObjects #endif \ No newline at end of file