summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-11 12:12:43 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-11 12:12:43 +0300
commit660d3b585ab50038e5b2ea3fb9cf4049a7e697d1 (patch)
tree63512148e5891f266bbdb110758484b0fb6957a5 /src/net/eathena
parent0a39e956218ca15bf78803f89141c7c9dfcec0d9 (diff)
downloadmv-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.gz
mv-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.bz2
mv-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.tar.xz
mv-660d3b585ab50038e5b2ea3fb9cf4049a7e697d1.zip
eathena: add packet CMSG_PET_CATCH 0x019f.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/pethandler.cpp13
-rw-r--r--src/net/eathena/pethandler.h2
-rw-r--r--src/net/eathena/protocol.h2
3 files changed, 16 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