diff options
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 17 |
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; } |