summaryrefslogtreecommitdiff
path: root/src/net/ea/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-18 01:32:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-18 23:29:17 +0300
commitcef2952156ab09371ed04beec00d0f1e8615ada9 (patch)
treeb5347f9025bdeafaafe38f41f796c97b58ba2656 /src/net/ea/beinghandler.cpp
parent67d3b8c193b51bbf892fd965547746511e8ddf87 (diff)
downloadmv-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.gz
mv-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.bz2
mv-cef2952156ab09371ed04beec00d0f1e8615ada9.tar.xz
mv-cef2952156ab09371ed04beec00d0f1e8615ada9.zip
add support for using sound delays.
hurt sounds now can be delayed for "delay" of hit sound.
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-rw-r--r--src/net/ea/beinghandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 8fb443803..db3db9dd4 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -454,10 +454,10 @@ void BeingHandler::processSkillDamage(Net::MessageIn &msg) const
const int level = msg.readInt16(); // Skill level
msg.readInt16(); // Div
msg.readInt8(); // Skill hit/type (?)
- if (dstBeing)
- dstBeing->takeDamage(srcBeing, param1, Being::SKILL, id);
if (srcBeing)
srcBeing->handleSkill(dstBeing, param1, id, level);
+ if (dstBeing)
+ dstBeing->takeDamage(srcBeing, param1, Being::SKILL, id);
}
void BeingHandler::processBeingAction(Net::MessageIn &msg) const
@@ -483,11 +483,6 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const
case Being::MULTI: // Critical Damage
case Being::REFLECT: // Reflected Damage
case Being::FLEE: // Lucky Dodge
- if (dstBeing)
- {
- dstBeing->takeDamage(srcBeing, param1,
- static_cast<Being::AttackType>(type));
- }
if (srcBeing)
{
if (srcSpeed && srcBeing->getType() == Being::PLAYER)
@@ -497,6 +492,11 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const
if (srcBeing->getType() == Being::PLAYER)
srcBeing->setAttackTime();
}
+ if (dstBeing)
+ {
+ dstBeing->takeDamage(srcBeing, param1,
+ static_cast<Being::AttackType>(type));
+ }
break;
case 0x01: // dead