summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-14 17:25:37 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-14 17:25:37 +0300
commit15424641cca695650f4b56c37711c12c81cf2c32 (patch)
tree6438f82c7542e265897c98565242767b2f9a0adc /src/net/eathena/beingrecv.cpp
parent1a5c1d155337923ab8b0c208ba7cc4dc3cb70e18 (diff)
downloadmanaplus-15424641cca695650f4b56c37711c12c81cf2c32.tar.gz
manaplus-15424641cca695650f4b56c37711c12c81cf2c32.tar.bz2
manaplus-15424641cca695650f4b56c37711c12c81cf2c32.tar.xz
manaplus-15424641cca695650f4b56c37711c12c81cf2c32.zip
Add cast action to beings.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index f80b16c54..836fdfc37 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -758,8 +758,6 @@ void BeingRecv::processMapType(Net::MessageIn &msg)
void BeingRecv::processSkillCasting(Net::MessageIn &msg)
{
- // +++ need use other parameters
-
const BeingId srcId = msg.readBeingId("src id");
const BeingId dstId = msg.readBeingId("dst id");
const int dstX = msg.readInt16("dst x");
@@ -781,11 +779,16 @@ void BeingRecv::processSkillCasting(Net::MessageIn &msg)
{ // being to being
Being *const srcBeing = actorManager->findBeing(srcId);
Being *const dstBeing = actorManager->findBeing(dstId);
+ if (srcBeing)
+ srcBeing->setAction(BeingAction::CAST, skillId);
skillDialog->playCastingSrcEffect(skillId, srcBeing);
skillDialog->playCastingDstEffect(skillId, dstBeing);
}
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);