summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2008-04-17 16:23:36 +0000
committerYohann Ferreira <bertram@cegetel.net>2008-04-17 16:23:36 +0000
commitc93e1faa1034519c26ef4481c7cfd0bd465a6d85 (patch)
tree78bce6818146f358b63a586196030d5a4f021ad0 /src/localplayer.h
parent1f639454d986ea0d44b563eaa71019d9f1c01c24 (diff)
downloadMana-c93e1faa1034519c26ef4481c7cfd0bd465a6d85.tar.gz
Mana-c93e1faa1034519c26ef4481c7cfd0bd465a6d85.tar.bz2
Mana-c93e1faa1034519c26ef4481c7cfd0bd465a6d85.tar.xz
Mana-c93e1faa1034519c26ef4481c7cfd0bd465a6d85.zip
Added input type parameter to the LocalPlayer::SetDestination methods in order to keep control over
message flooding to the server with mouse dragging. (I need feedback !)
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index b5e7c3eb..2813ca77 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -28,9 +28,6 @@
#include <memory>
-// TODO move into some sane place...
-#define MAX_SLOT 2
-
class FloorItem;
class Inventory;
class Item;
@@ -118,6 +115,10 @@ enum
NB_CHARACTER_ATTRIBUTES = CHAR_SKILL_END
};
+enum InputType {
+ BY_MOUSE = 0, BY_KEYBOARD, BY_SYSTEM
+};
+
/**
* The local player character.
@@ -248,7 +249,7 @@ class LocalPlayer : public Player
/**
* Sets a new destination for this being to walk to.
*/
- void setDestination(Uint16 x, Uint16 y);
+ void setDestination(Uint16 x, Uint16 y, InputType inputType);
/**
* Sets a new direction to keep walking in.
@@ -371,6 +372,8 @@ class LocalPlayer : public Player
int mWalkingDir; /**< The direction the player is walking in. */
int mDestX; /**< X coordinate of destination. */
int mDestY; /**< Y coordinate of destination. */
+ int mLocalWalkTime; /**< Time in millisecs before the next walk
+ can be sent when using mouse. */
std::list<std::string> mExpMessages; /**< Queued exp messages*/
int mExpMessageTime;