summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-19 16:36:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-19 16:36:52 +0300
commitad6f481792dd4df5adc47bec543bb1e349d566d9 (patch)
tree5220832bee60472f530164673195daff1508278d /src/net
parent81dcbc085f750fa8dfe6401b774c1b930e95e5ca (diff)
downloadmanaverse-ad6f481792dd4df5adc47bec543bb1e349d566d9.tar.gz
manaverse-ad6f481792dd4df5adc47bec543bb1e349d566d9.tar.bz2
manaverse-ad6f481792dd4df5adc47bec543bb1e349d566d9.tar.xz
manaverse-ad6f481792dd4df5adc47bec543bb1e349d566d9.zip
Add support casting flag what allow moving.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/beingrecv.cpp10
-rw-r--r--src/net/eathena/beingrecv.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 16004ac82..8686ce564 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -927,6 +927,7 @@ void BeingRecv::processSkillCasting(Net::MessageIn &msg)
skillId,
1,
0,
+ SkillType2::Unknown,
castTime);
}
@@ -942,6 +943,8 @@ void BeingRecv::processSkillCasting2(Net::MessageIn &msg)
msg.readInt32("property"); // can be used to trigger effect
const int castTime = msg.readInt32("cast time");
const int range = msg.readInt32("skill range");
+ const SkillType2::SkillType2 inf2 =
+ static_cast<SkillType2::SkillType2>(msg.readInt32("inf2"));
processSkillCastingContinue(msg,
srcId, dstId,
@@ -949,6 +952,7 @@ void BeingRecv::processSkillCasting2(Net::MessageIn &msg)
skillId,
skillLevel,
range,
+ inf2,
castTime);
}
@@ -960,6 +964,7 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
const int skillId,
const int skillLevel,
const int range,
+ const SkillType2::SkillType2 inf2,
const int castTime)
{
if (!effectManager)
@@ -992,8 +997,11 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
range,
castTime / MILLISECONDS_IN_A_TICK);
}
- if (srcBeing == localPlayer)
+ if (srcBeing == localPlayer &&
+ (inf2 & SkillType2::FreeCastAny) == 0)
+ {
localPlayer->freezeMoving(castTime / MILLISECONDS_IN_A_TICK);
+ }
}
void BeingRecv::processBeingStatusChange(Net::MessageIn &msg)
diff --git a/src/net/eathena/beingrecv.h b/src/net/eathena/beingrecv.h
index a8044a175..6809d704a 100644
--- a/src/net/eathena/beingrecv.h
+++ b/src/net/eathena/beingrecv.h
@@ -25,6 +25,8 @@
#include "net/eathena/beingtype.h"
+#include "enums/resources/skilltype2.h"
+
#include "enums/simpletypes/beingid.h"
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
@@ -126,6 +128,7 @@ namespace EAthena
const int skillId,
const int skillLevel,
const int range,
+ const SkillType2::SkillType2 inf2,
const int castTime);
} // namespace BeingRecv
} // namespace EAthena