summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packetsout.inc19
-rw-r--r--src/net/eathena/skillhandler.cpp19
-rw-r--r--src/net/eathena/skillhandler.h4
-rw-r--r--src/net/skillhandler.h4
-rw-r--r--src/net/tmwa/skillhandler.cpp6
-rw-r--r--src/net/tmwa/skillhandler.h4
6 files changed, 56 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;
diff --git a/src/net/skillhandler.h b/src/net/skillhandler.h
index 858e29513..8459c6c61 100644
--- a/src/net/skillhandler.h
+++ b/src/net/skillhandler.h
@@ -46,6 +46,10 @@ class SkillHandler notfinal
const int level,
const BeingId beingId) const = 0;
+ virtual void useBeingStart(const int id,
+ const int level,
+ const BeingId beingId) const = 0;
+
virtual void usePos(const int id,
const int level,
const int x, const int y) const = 0;
diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp
index 7fe3c28dc..315105b8b 100644
--- a/src/net/tmwa/skillhandler.cpp
+++ b/src/net/tmwa/skillhandler.cpp
@@ -50,6 +50,12 @@ void SkillHandler::useBeing(const int id, const int level,
outMsg.writeBeingId(beingId, "target id");
}
+void SkillHandler::useBeingStart(const int id A_UNUSED,
+ const int level A_UNUSED,
+ const BeingId beingId A_UNUSED) const
+{
+}
+
void SkillHandler::usePos(const int id, const int level,
const int x, const int y) const
{
diff --git a/src/net/tmwa/skillhandler.h b/src/net/tmwa/skillhandler.h
index f1eaf865f..c44069512 100644
--- a/src/net/tmwa/skillhandler.h
+++ b/src/net/tmwa/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;