From 9f1d941ea4195ec4c4942fac47fde24c19265d5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 25 Jan 2019 20:44:42 +0300 Subject: Add packet CMSG_SKILL_USE_BEING_STOP 0x0b11 --- src/net/eathena/packetsout.inc | 4 ++++ src/net/eathena/skillhandler.cpp | 13 +++++++++++++ src/net/eathena/skillhandler.h | 2 ++ src/net/skillhandler.h | 2 ++ src/net/tmwa/skillhandler.cpp | 4 ++++ src/net/tmwa/skillhandler.h | 2 ++ 6 files changed, 27 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-60-g2f50