summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-20 20:55:37 +0000
commite99b6aaeb119feabfa2f7c3c49908625981e9708 (patch)
tree00f599c90443be884b9b8b51618552c2f8834f2d /src/localplayer.h
parenteadbe0cb009b8c8fec622946f0b0109a2f07b1f1 (diff)
downloadmana-client-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.gz
mana-client-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.bz2
mana-client-e99b6aaeb119feabfa2f7c3c49908625981e9708.tar.xz
mana-client-e99b6aaeb119feabfa2f7c3c49908625981e9708.zip
Now different sounds can play when a monster misses the player.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index b120969e..f4ba3747 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -36,6 +36,9 @@ class Inventory;
class Item;
class Network;
+/**
+ * The local player character.
+ */
class LocalPlayer : public Player
{
public:
@@ -112,11 +115,23 @@ class LocalPlayer : public Player
*/
void setTrading(bool trading) { mTrading = trading; }
- void attack(Being *target=NULL, bool keep=false);
+ void attack(Being *target = NULL, bool keep = false);
+
void stopAttack();
+
Being* getTarget() const;
/**
+ * Overridden to do nothing. The attacks of the local player are
+ * displayed as soon as the player attacks, not when the server says
+ * the player does.
+ *
+ * @param victim The attacked being.
+ * @param damage The amount of damage dealt (0 means miss).
+ */
+ virtual void handleAttack(Being *victim, int damage) {}
+
+ /**
* Sets the target being of the player.
*/
void setTarget(Being* target) { mTarget = target; }