summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/packetsout.inc19
-rw-r--r--src/net/eathena/skillhandler.cpp19
-rw-r--r--src/net/eathena/skillhandler.h4
3 files changed, 42 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index ec05f490f..1f98f2c86 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -349,6 +349,7 @@ packet(CMSG_LOGIN_OTP_CODE, 0x0000, 0, nullptr);
packet(CMSG_INVENTORY_EXPAND, 0x0000, 0, nullptr);
packet(CMSG_INVENTORY_EXPAND_CONFIRM, 0x0000, 0, nullptr);
packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0000, 0, nullptr);
+packet(CMSG_SKILL_USE_BEING_START, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1469,6 +1470,24 @@ if (packetVersionRe >= 20180718)
packet(CMSG_PLAYER_SELECT_STYLE, 0x0afc, 16, clif->pReqStyleChange);
}
+// 20181002 main
+if (packetVersionMain >= 20181002)
+{
+ packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+}
+
+// 20181002 re
+if (packetVersionRe >= 20181002)
+{
+ packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+}
+
+// 20181010 zero
+if (packetVersionZero >= 20181010)
+{
+ packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+}
+
// 20181031 main
if (packetVersionMain >= 20181031)
{
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 0efad6190..1b97b5044 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -29,6 +29,8 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionMain;
+extern int packetVersionRe;
extern int packetVersionZero;
namespace EAthena
@@ -54,6 +56,23 @@ void SkillHandler::useBeing(const int id, const int level,
outMsg.writeInt32(toInt(beingId, int), "target id");
}
+void SkillHandler::useBeingStart(const int id,
+ const int level,
+ const BeingId beingId) const
+{
+ if (packetVersionMain < 20181002 &&
+ packetVersionRe < 20181002 &&
+ packetVersionZero < 20181010)
+ {
+ return;
+ }
+
+ createOutPacket(CMSG_SKILL_USE_BEING_START);
+ outMsg.writeInt16(CAST_S16(level), "skill level");
+ outMsg.writeInt16(CAST_S16(id), "skill id");
+ outMsg.writeInt32(toInt(beingId, int), "target id");
+}
+
void SkillHandler::usePos(const int id, const int level,
const int x, const int y) const
{
diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h
index 714e985bc..f1f7634e6 100644
--- a/src/net/eathena/skillhandler.h
+++ b/src/net/eathena/skillhandler.h
@@ -41,6 +41,10 @@ class SkillHandler final : public Ea::SkillHandler
const int level,
const BeingId beingId) const override final;
+ void useBeingStart(const int id,
+ const int level,
+ const BeingId beingId) const override final;
+
void usePos(const int id,
const int level,
const int x, const int y) const override final;