summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-24 02:41:43 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-24 02:41:43 +0200
commit904483e4b334ead430c6629b5fdba5e20d2eacd0 (patch)
tree447efff9a0131dfacebb3168d83ed2eb428b56a3 /src/net/tmwa/beinghandler.cpp
parent0b63b888d8a05c5422b256970f8da33c1faf209b (diff)
downloadmana-client-904483e4b334ead430c6629b5fdba5e20d2eacd0.tar.gz
mana-client-904483e4b334ead430c6629b5fdba5e20d2eacd0.tar.bz2
mana-client-904483e4b334ead430c6629b5fdba5e20d2eacd0.tar.xz
mana-client-904483e4b334ead430c6629b5fdba5e20d2eacd0.zip
Made use of the attack speed sent by the tA server.
Part of issue #343.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 7adb6ed7..41345acb 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -345,22 +345,25 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_SKILL_DAMAGE:
+ {
msg.readInt16(); // Skill Id
srcBeing = actorSpriteManager->findBeing(msg.readInt32());
dstBeing = actorSpriteManager->findBeing(msg.readInt32());
msg.readInt32(); // Server tick
- msg.readInt32(); // src speed
+ int attackSpeed = msg.readInt32(); // src speed
msg.readInt32(); // dst speed
param1 = msg.readInt32(); // Damage
msg.readInt16(); // Skill level
msg.readInt16(); // Div
msg.readInt8(); // Skill hit/type (?)
+ if (attackSpeed && srcBeing && srcBeing != player_node)
+ srcBeing->setAttackSpeed(attackSpeed);
if (dstBeing)
dstBeing->takeDamage(srcBeing, param1, Being::HIT); // Perhaps a new skill attack type should be created and used?
if (srcBeing)
srcBeing->handleAttack(dstBeing, param1, Being::HIT);
break;
-
+ }
case SMSG_BEING_ACTION:
srcBeing = actorSpriteManager->findBeing(msg.readInt32());
dstBeing = actorSpriteManager->findBeing(msg.readInt32());