summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-29 22:38:01 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-29 22:38:01 +0300
commit1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06 (patch)
tree2d7a5f379c70b16d12782f75568dab59de764551 /src/net/eathena/beingrecv.cpp
parenteac67bd477047c2da9a2aeabadd93554cccf0ed8 (diff)
downloadplus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.gz
plus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.bz2
plus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.xz
plus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.zip
Fix code style.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index b918ae108..426003c7f 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -980,15 +980,17 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
{ // being to being
Being *const dstBeing = actorManager->findBeing(dstId);
if (srcBeing)
- srcBeing->handleSkillCasting(dstBeing, skillId, skillLevel);
- if (dstBeing)
{
- srcBeing->addCast(dstBeing->getTileX(),
- dstBeing->getTileY(),
- skillId,
- skillLevel,
- range,
- castTime / MILLISECONDS_IN_A_TICK);
+ srcBeing->handleSkillCasting(dstBeing, skillId, skillLevel);
+ if (dstBeing)
+ {
+ srcBeing->addCast(dstBeing->getTileX(),
+ dstBeing->getTileY(),
+ skillId,
+ skillLevel,
+ range,
+ castTime / MILLISECONDS_IN_A_TICK);
+ }
}
}
else if (dstX != 0 || dstY != 0)
@@ -999,11 +1001,14 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
skillLevel,
dstX, dstY,
castTime);
- srcBeing->addCast(dstX, dstY,
- skillId,
- skillLevel,
- range,
- castTime / MILLISECONDS_IN_A_TICK);
+ if (srcBeing)
+ {
+ srcBeing->addCast(dstX, dstY,
+ skillId,
+ skillLevel,
+ range,
+ castTime / MILLISECONDS_IN_A_TICK);
+ }
}
if (srcBeing == localPlayer &&
(inf2 & SkillType2::FreeCastAny) == 0)