summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/enums/resources/skilltype.h1
-rw-r--r--src/enums/resources/skilltype2.h51
-rw-r--r--src/net/eathena/beingrecv.cpp10
-rw-r--r--src/net/eathena/beingrecv.h3
6 files changed, 66 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 062b94540..8b0a0c3b2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -771,6 +771,7 @@ SET(SRCS
const/resources/skill.h
enums/resources/skillowner.h
enums/resources/skilltype.h
+ enums/resources/skilltype2.h
resources/db/sounddb.cpp
resources/db/sounddb.h
resources/db/statdb.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 7bf77c690..67b62dfd4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -442,6 +442,7 @@ SRC += events/actionevent.h \
const/resources/skill.h \
enums/resources/skillowner.h \
enums/resources/skilltype.h \
+ enums/resources/skilltype2.h \
resources/soundeffect.cpp \
resources/soundeffect.h \
resources/soundinfo.h \
diff --git a/src/enums/resources/skilltype.h b/src/enums/resources/skilltype.h
index c91589034..bc2b75db6 100644
--- a/src/enums/resources/skilltype.h
+++ b/src/enums/resources/skilltype.h
@@ -21,6 +21,7 @@
#ifndef ENUMS_RESOURCES_SKILLTYPE_H
#define ENUMS_RESOURCES_SKILLTYPE_H
+// aka inf
namespace SkillType
{
enum SkillType
diff --git a/src/enums/resources/skilltype2.h b/src/enums/resources/skilltype2.h
new file mode 100644
index 000000000..30bf9187b
--- /dev/null
+++ b/src/enums/resources/skilltype2.h
@@ -0,0 +1,51 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2016 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ENUMS_RESOURCES_SKILLTYPE2_H
+#define ENUMS_RESOURCES_SKILLTYPE2_H
+
+// aka inf2
+namespace SkillType2
+{
+ enum SkillType2
+ {
+ Unknown = 0,
+ Quest = 1,
+ Npc = 2,
+ Wedding = 4,
+ Spirit = 8,
+ Guild = 16,
+ SongDance = 32,
+ Ensemble = 64,
+ Trap = 128,
+ TargetSelf = 256,
+ NoTargetSelf = 512,
+ PartyOnly = 1024,
+ GuildOnly = 2048,
+ NoEnemy = 4096,
+ NoLandProtector = 8192,
+ Chorus = 16384,
+ FreeCastNormal = 32768,
+ FreeCastReduced = 65536,
+ FreeCastAny = 98304
+ };
+} // namespace SkillType2
+
+#endif // ENUMS_RESOURCES_SKILLTYPE2_H
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