diff options
author | Bertram <bertram@cegetel.net> | 2010-02-01 23:59:14 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-02-01 23:59:14 +0100 |
commit | d6329c13a589affed482783272db23e4980a5507 (patch) | |
tree | 9f59a4f5f02d36add0c42f22b36a980c9428cc66 /src/localplayer.h | |
parent | 35bddde62fe1b7e60a78e2f699e1035ea6579066 (diff) | |
download | mana-d6329c13a589affed482783272db23e4980a5507.tar.gz mana-d6329c13a589affed482783272db23e4980a5507.tar.bz2 mana-d6329c13a589affed482783272db23e4980a5507.tar.xz mana-d6329c13a589affed482783272db23e4980a5507.zip |
Small cleanups.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 56 |
1 files changed, 42 insertions, 14 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index 36876500..58be0824 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -117,13 +117,15 @@ class LocalPlayer : public Player virtual void setAction(Action action, int attackType = 0); /** - * Adds a new step when walking before calling super. Also, when - * specified it picks up an item at the end of a path. + * Adds a new tile to the path when walking. + * @note Eathena + * Also, when specified, it picks up an item at the end of a path + * or attack target. */ - virtual void nextStep() - { nextStep(0); } + virtual void nextTile() + { nextTile(0); } - virtual void nextStep(unsigned char dir); + virtual void nextTile(unsigned char dir); /** * Returns the player's inventory. @@ -357,12 +359,6 @@ class LocalPlayer : public Player bool isPathSetByMouse() const { return mPathSetByMouse; } - bool mUpdateName; /** Whether or not the name settings have changed */ - - bool mMapInitialized; /** Whether or not the map is available yet */ - - const std::auto_ptr<Equipment> mEquipment; - void addMessageToQueue(const std::string &message, Palette::ColorType color = Palette::EXP_INFO); @@ -385,16 +381,48 @@ class LocalPlayer : public Player int getNextDestY() const { return mNextDestY; } /** - * stops a following + * Stop following a player. */ void cancelFollow() { mPlayerFollowed = ""; } /** - * get following + * Get the playername followed by the current player. */ std::string getFollow() const { return mPlayerFollowed; } + /** + * Tells the engine wether to check + * if the Player Name is to be displayed. + */ + void setCheckNameSetting(bool checked) { mUpdateName = checked; } + + /** + * Gets if the engine has to check + * if the Player Name is to be displayed. + */ + bool getCheckNameSetting() const { return mUpdateName; } + + /** + * Set if the current map is initialized. + */ + void setMapInitialized(bool initialized) + { mMapInitialized = initialized; } + + /** + * Tells if the current map is initialized. + */ + bool isMapInitialized() const { return mMapInitialized; } + + /** Keeps the Equipment related values */ + const std::auto_ptr<Equipment> mEquipment; + protected: + + /** Whether or not the name settings have changed */ + bool mUpdateName; + + bool mMapInitialized; /**< Whether or not the map is available yet */ + virtual void handleStatusEffect(StatusEffect *effect, int effectId); // Colors don't change for local player @@ -458,7 +486,7 @@ class LocalPlayer : public Player Inventory *mStorage; - // Load the target cursors into memory + /** Load the target cursors into memory */ void initTargetCursor(); /** |