diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-11 12:12:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-11 12:12:43 +0300 |
commit | 660d3b585ab50038e5b2ea3fb9cf4049a7e697d1 (patch) | |
tree | 63512148e5891f266bbdb110758484b0fb6957a5 /src | |
parent | 0a39e956218ca15bf78803f89141c7c9dfcec0d9 (diff) | |
download | manaverse-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.gz manaverse-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.bz2 manaverse-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.xz manaverse-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.zip |
eathena: add packet CMSG_PET_CATCH 0x019f.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 13 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 | ||||
-rw-r--r-- | src/net/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.h | 2 |
6 files changed, 24 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index f96176c38..1b8f77881 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -22,9 +22,11 @@ #include "gui/chatconsts.h" +#include "net/chathandler.h" #include "net/net.h" -#include "net/chathandler.h" +#include "net/eathena/messageout.h" +#include "net/eathena/protocol.h" #include "debug.h" @@ -74,4 +76,13 @@ void PetHandler::emote(const uint8_t emoteId, const int petId A_UNUSED) static_cast<int>(emoteId), mRandCounter), GENERAL_CHANNEL); } +void PetHandler::catchPet(const Being *const being) const +{ + if (!being) + return; + + MessageOut outMsg(CMSG_PET_CATCH); + outMsg.writeInt32(being->getId()); +} + } // namespace EAthena diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 7ddb7422b..126089724 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -49,6 +49,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void emote(const uint8_t emoteId, const int petId) override final; + void catchPet(const Being *const being) const override final; + protected: int mRandCounter; }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index c49550fa5..bad8fa1a9 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -337,6 +337,8 @@ #define CMSG_REMOVE_OPTION 0x012a #define CMSG_PLAYER_SET_MEMO 0x011d +#define CMSG_PET_CATCH 0x019f + #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb #define SMSG_SKILL_CAST_CANCEL 0x01b9 diff --git a/src/net/pethandler.h b/src/net/pethandler.h index ac9a6f980..750baf4dc 100644 --- a/src/net/pethandler.h +++ b/src/net/pethandler.h @@ -42,6 +42,8 @@ class PetHandler notfinal const int x, const int y) const = 0; virtual void emote(const uint8_t emoteId, const int petId) = 0; + + virtual void catchPet(const Being *const being) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp index edc18b02d..dc15929ed 100644 --- a/src/net/tmwa/pethandler.cpp +++ b/src/net/tmwa/pethandler.cpp @@ -74,4 +74,8 @@ void PetHandler::emote(const uint8_t emoteId, const int petId A_UNUSED) static_cast<int>(emoteId), mRandCounter), GENERAL_CHANNEL); } +void PetHandler::catchPet(const Being *const being A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h index bcfa6b1a6..93d3ef2d4 100644 --- a/src/net/tmwa/pethandler.h +++ b/src/net/tmwa/pethandler.h @@ -49,6 +49,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void emote(const uint8_t emoteId, const int petId) override final; + void catchPet(const Being *const being) const override final; + protected: int mRandCounter; }; |