summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-17 22:03:36 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-17 22:03:36 +0300
commit1ce5e20594dbf44d6311d217cdba3b217491fc0b (patch)
tree982c0042f9d50c48c9a3bceecbbc2682922af3e6 /src/net
parenteed4e612309c788565eda120fa2ad30de50ca19e (diff)
downloadmanaverse-1ce5e20594dbf44d6311d217cdba3b217491fc0b.tar.gz
manaverse-1ce5e20594dbf44d6311d217cdba3b217491fc0b.tar.bz2
manaverse-1ce5e20594dbf44d6311d217cdba3b217491fc0b.tar.xz
manaverse-1ce5e20594dbf44d6311d217cdba3b217491fc0b.zip
Freeze plater while casting skill.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/beingrecv.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 3087824d5..af5edc74d 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -30,6 +30,8 @@
#include "being/mercenaryinfo.h"
+#include "const/utils/timer.h"
+
#include "enums/resources/notifytypes.h"
#include "particle/particleengine.h"
@@ -961,9 +963,9 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
UNIMPLIMENTEDPACKETFIELD(0);
return;
}
- else if (dstId != BeingId_zero)
+ Being *const srcBeing = actorManager->findBeing(srcId);
+ if (dstId != BeingId_zero)
{ // being to being
- Being *const srcBeing = actorManager->findBeing(srcId);
Being *const dstBeing = actorManager->findBeing(dstId);
if (srcBeing)
srcBeing->setAction(BeingAction::CAST, skillId);
@@ -972,13 +974,14 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
}
else if (dstX != 0 || dstY != 0)
{ // being to position
- Being *const srcBeing = actorManager->findBeing(srcId);
if (srcBeing)
srcBeing->setAction(BeingAction::CAST, skillId);
skillDialog->playCastingDstTileEffect(skillId,
dstX, dstY,
castTime);
}
+ if (srcBeing == localPlayer)
+ localPlayer->freezeMoving(castTime / MILLISECONDS_IN_A_TICK);
}
void BeingRecv::processBeingStatusChange(Net::MessageIn &msg)