From 83455b8803cfaaa537c8d15c64b5553c664885f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Sep 2014 18:26:33 +0300 Subject: Add packet CMSG_SKILL_USE_POSITION_MORE 0x096a. --- src/net/eathena/protocol.h | 2 +- src/net/eathena/skillhandler.cpp | 12 ++++++++++++ src/net/eathena/skillhandler.h | 4 ++++ src/net/skillhandler.h | 4 ++++ src/net/tmwa/skillhandler.cpp | 12 ++++++++++++ src/net/tmwa/skillhandler.h | 4 ++++ 6 files changed, 37 insertions(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index a037ec75e..a147897cd 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -233,7 +233,7 @@ #define CMSG_SKILL_USE_BEING 0x083c #define CMSG_SKILL_USE_POSITION 0x091e // Variant of 0x116 with 80 char string at end (unsure of use) -#define CMSG_SKILL_USE_POSITION_MORE 0x0366 +#define CMSG_SKILL_USE_POSITION_MORE 0x096a #define CMSG_SKILL_USE_MAP 0x011b #define CMSG_PLAYER_INVENTORY_USE 0x0439 diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index ef0b7d399..162448660 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -91,6 +91,18 @@ void SkillHandler::usePos(const int id, const int level, outMsg.writeInt16(static_cast(y)); } +void SkillHandler::usePos(const int id, const int level, + const int x, const int y, + const std::string &text) const +{ + MessageOut outMsg(CMSG_SKILL_USE_POSITION_MORE); + outMsg.writeInt16(static_cast(level), "level"); + outMsg.writeInt16(static_cast(id), "id"); + outMsg.writeInt16(static_cast(x), "x"); + outMsg.writeInt16(static_cast(y), "y"); + outMsg.writeString(text, 80, "text"); +} + void SkillHandler::useMap(const int id, const std::string &map) const { MessageOut outMsg(CMSG_SKILL_USE_MAP); diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h index c33971245..e387387b4 100644 --- a/src/net/eathena/skillhandler.h +++ b/src/net/eathena/skillhandler.h @@ -45,6 +45,10 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler void usePos(const int id, const int level, const int x, const int y) const override final; + void usePos(const int id, const int level, + const int x, const int y, + const std::string &text) const override final; + void useMap(const int id, const std::string &map) const override final; protected: diff --git a/src/net/skillhandler.h b/src/net/skillhandler.h index aec1a77e6..929629db4 100644 --- a/src/net/skillhandler.h +++ b/src/net/skillhandler.h @@ -41,6 +41,10 @@ class SkillHandler notfinal virtual void usePos(const int id, const int level, const int x, const int y) const = 0; + virtual void usePos(const int id, const int level, + const int x, const int y, + const std::string &text) const = 0; + virtual void useMap(const int id, const std::string &map) const = 0; }; diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index da6a04b7e..26902f18e 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -93,6 +93,18 @@ void SkillHandler::usePos(const int id, const int level, outMsg.writeInt16(static_cast(y)); } +void SkillHandler::usePos(const int id, const int level, + const int x, const int y, + const std::string &text) const +{ + MessageOut outMsg(CMSG_SKILL_USE_POSITION_MORE); + outMsg.writeInt16(static_cast(level), "level"); + outMsg.writeInt16(static_cast(id), "id"); + outMsg.writeInt16(static_cast(x), "x"); + outMsg.writeInt16(static_cast(y), "y"); + outMsg.writeString(text, 80, "text"); +} + void SkillHandler::useMap(const int id, const std::string &map) const { MessageOut outMsg(CMSG_SKILL_USE_MAP); diff --git a/src/net/tmwa/skillhandler.h b/src/net/tmwa/skillhandler.h index a0be82c63..a1029ae6b 100644 --- a/src/net/tmwa/skillhandler.h +++ b/src/net/tmwa/skillhandler.h @@ -45,6 +45,10 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler void usePos(const int id, const int level, const int x, const int y) const override final; + void usePos(const int id, const int level, + const int x, const int y, + const std::string &text) const override final; + void useMap(const int id, const std::string &map) const override final; protected: -- cgit v1.2.3-70-g09d2