summaryrefslogtreecommitdiff
path: root/src/game-server/autoattack.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-24 01:49:58 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-24 01:49:58 +0200
commitb4589749217c550db0849b439b6687ff4f5822d7 (patch)
tree7e23d1b1e3397cf3bdc8f45c3fa2aab244fb003b /src/game-server/autoattack.h
parentbb7033e0247ab1d3a526a5d68f9c482f6ff01ba7 (diff)
downloadmanaserv-b4589749217c550db0849b439b6687ff4f5822d7.tar.gz
manaserv-b4589749217c550db0849b439b6687ff4f5822d7.tar.bz2
manaserv-b4589749217c550db0849b439b6687ff4f5822d7.tar.xz
manaserv-b4589749217c550db0849b439b6687ff4f5822d7.zip
Fixed autoattacks basic handling.
The server is now using the autoattacks system to perform damage based on the attack's timer. I also added a default bare knuckle attack when the character is unequipped. As a result, maggots can be killed again with bare hands now. Known issues left: This isn't tested against equipment changes for now, and the client isn't in sync with the attacks speed. Reviewed-by: Crush.
Diffstat (limited to 'src/game-server/autoattack.h')
-rw-r--r--src/game-server/autoattack.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game-server/autoattack.h b/src/game-server/autoattack.h
index 268f429c..2e891fa9 100644
--- a/src/game-server/autoattack.h
+++ b/src/game-server/autoattack.h
@@ -143,6 +143,18 @@ class AutoAttacks
void stop(); // If the character does some action other than attacking, reset all warmups (NOT cooldowns!)
void tick(std::list<AutoAttack> *ret = 0);
+ /**
+ * Tells the number of attacks available
+ */
+ unsigned getAutoAttacksNumber()
+ { return mAutoAttacks.size(); }
+
+ /**
+ * Tells whether the autoattacks are active.
+ */
+ bool areActive()
+ { return mActive; }
+
private:
/**
* Marks whether or not to keep auto-attacking. Cooldowns still need