diff options
author | BlueSansDouze <bluesansdouze@gmail.com> | 2010-01-13 13:45:27 +0100 |
---|---|---|
committer | BlueSansDouze <bluesansdouze@gmail.com> | 2010-01-13 14:22:44 +0100 |
commit | 94bfab1a7d1ac3626d15c30b8c6668de9455f3ed (patch) | |
tree | e569de48e7553e86d2abf0822c2646c4b1c1f95a /src/localplayer.h | |
parent | 61959f6a04c6a6712b5334ebd6bf21da4736431f (diff) | |
download | mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.gz mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.bz2 mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.xz mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.zip |
Adds a follow manager for users
Right click contextual menu on player "follow" entry
Cancel the following by moving with mouse or keys
Adds a special behavior for map changes
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index bc4f3647..52e3597e 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -374,6 +374,29 @@ class LocalPlayer : public Player * Called when a option (set with config.addListener()) is changed */ void optionChanged(const std::string &value); + + /** + * set a following player by right clicking. + */ + void setFollow(std::string player) { mPlayerFollowed = player; } + + /** + * setting the next destination of the following, in case of warp + */ + void setNextDest(int x, int y) { mNextDestX = x; mNextDestY = y; } + + int getNextDestX() const { return mNextDestX; } + int getNextDestY() const { return mNextDestY; } + + /** + * stops a following + */ + void cancelFollow() { mPlayerFollowed = ""; } + + /** + * get following + */ + std::string getFollow() const { return mPlayerFollowed; } protected: virtual void handleStatusEffect(StatusEffect *effect, int effectId); @@ -413,6 +436,12 @@ class LocalPlayer : public Player int mGMLevel; Being *mTarget; + + /** Follow system **/ + std::string mPlayerFollowed; + int mNextDestX; + int mNextDestY; + FloorItem *mPickUpTarget; bool mTrading; |