summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-25 20:44:42 +0300
committerAndrei Karas <akaras@inbox.ru>2019-01-25 20:44:42 +0300
commit9f1d941ea4195ec4c4942fac47fde24c19265d5b (patch)
treeaf50f9ee1f1d6d869d1df3da1792a38d4d04d02a
parent3e25eaf71f76daaf846b640e691209a5f26e1cce (diff)
downloadplus-9f1d941ea4195ec4c4942fac47fde24c19265d5b.tar.gz
plus-9f1d941ea4195ec4c4942fac47fde24c19265d5b.tar.bz2
plus-9f1d941ea4195ec4c4942fac47fde24c19265d5b.tar.xz
plus-9f1d941ea4195ec4c4942fac47fde24c19265d5b.zip
Add packet CMSG_SKILL_USE_BEING_STOP 0x0b11
-rw-r--r--src/net/eathena/packetsout.inc4
-rw-r--r--src/net/eathena/skillhandler.cpp13
-rw-r--r--src/net/eathena/skillhandler.h2
-rw-r--r--src/net/skillhandler.h2
-rw-r--r--src/net/tmwa/skillhandler.cpp4
-rw-r--r--src/net/tmwa/skillhandler.h2
6 files changed, 27 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 1f98f2c86..a61f8b48b 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -350,6 +350,7 @@ 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);
+packet(CMSG_SKILL_USE_BEING_STOP, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1474,18 +1475,21 @@ if (packetVersionRe >= 20180718)
if (packetVersionMain >= 20181002)
{
packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+ packet(CMSG_SKILL_USE_BEING_STOP, 0x0b11, 4, clif->pStopUseSkillToId);
}
// 20181002 re
if (packetVersionRe >= 20181002)
{
packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+ packet(CMSG_SKILL_USE_BEING_STOP, 0x0b11, 4, clif->pStopUseSkillToId);
}
// 20181010 zero
if (packetVersionZero >= 20181010)
{
packet(CMSG_SKILL_USE_BEING_START, 0x0b10, 10, clif->pStartUseSkillToId);
+ packet(CMSG_SKILL_USE_BEING_STOP, 0x0b11, 4, clif->pStopUseSkillToId);
}
// 20181031 main
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 1b97b5044..381c00231 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -73,6 +73,19 @@ void SkillHandler::useBeingStart(const int id,
outMsg.writeInt32(toInt(beingId, int), "target id");
}
+void SkillHandler::useStop(const int id) const
+{
+ if (packetVersionMain < 20181002 &&
+ packetVersionRe < 20181002 &&
+ packetVersionZero < 20181010)
+ {
+ return;
+ }
+
+ createOutPacket(CMSG_SKILL_USE_BEING_STOP);
+ outMsg.writeInt16(CAST_S16(id), "skill 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 f1f7634e6..3b7be638c 100644
--- a/src/net/eathena/skillhandler.h
+++ b/src/net/eathena/skillhandler.h
@@ -45,6 +45,8 @@ class SkillHandler final : public Ea::SkillHandler
const int level,
const BeingId beingId) const override final;
+ void useStop(const int id) 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 8459c6c61..4c56bd787 100644
--- a/src/net/skillhandler.h
+++ b/src/net/skillhandler.h
@@ -50,6 +50,8 @@ class SkillHandler notfinal
const int level,
const BeingId beingId) const = 0;
+ virtual void useStop(const int id) 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 315105b8b..53c31451a 100644
--- a/src/net/tmwa/skillhandler.cpp
+++ b/src/net/tmwa/skillhandler.cpp
@@ -56,6 +56,10 @@ void SkillHandler::useBeingStart(const int id A_UNUSED,
{
}
+void SkillHandler::useStop(const int id 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 c44069512..e33f8af13 100644
--- a/src/net/tmwa/skillhandler.h
+++ b/src/net/tmwa/skillhandler.h
@@ -45,6 +45,8 @@ class SkillHandler final : public Ea::SkillHandler
const int level,
const BeingId beingId) const override final;
+ void useStop(const int id) const override final;
+
void usePos(const int id,
const int level,
const int x, const int y) const override final;