From d276f218f8b1b06d088fe83ae5e11ab11deaa259 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Sep 2014 20:51:35 +0300 Subject: eathena: add packet CMSG_ASK_FOR_CHILD 0x01f9. --- src/net/eathena/familyhandler.cpp | 11 +++++++++++ src/net/eathena/familyhandler.h | 2 ++ src/net/eathena/protocol.h | 2 ++ src/net/familyhandler.h | 4 ++++ src/net/tmwa/familyhandler.cpp | 4 ++++ src/net/tmwa/familyhandler.h | 2 ++ 6 files changed, 25 insertions(+) diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp index 76b31ba3d..3c5892aa1 100644 --- a/src/net/eathena/familyhandler.cpp +++ b/src/net/eathena/familyhandler.cpp @@ -22,6 +22,8 @@ #include "logger.h" +#include "being/being.h" + #include "net/ea/eaprotocol.h" #include "net/eathena/messageout.h" @@ -54,4 +56,13 @@ void FamilyHandler::handleMessage(Net::MessageIn &msg) } } +void FamilyHandler::askForChild(const Being *const being) +{ + if (!being) + return; + + MessageOut outMsg(CMSG_ASK_FOR_CHILD); + outMsg.writeInt32(being->getId()); +} + } // namespace EAthena diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h index 2a1e0d907..170ca6351 100644 --- a/src/net/eathena/familyhandler.h +++ b/src/net/eathena/familyhandler.h @@ -38,6 +38,8 @@ class FamilyHandler final : public MessageHandler, A_DELETE_COPY(FamilyHandler) void handleMessage(Net::MessageIn &msg) override final; + + void askForChild(const Being *const being) override final; }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 16e5d481c..1be6d93ed 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -375,6 +375,8 @@ #define CMSG_MAIL_RESET_ATTACH 0x0246 #define CMSG_MAIL_SEND 0x0248 +#define CMSG_ASK_FOR_CHILD 0x01f9 + #define SMSG_SOLVE_CHAR_NAME 0x0194 #define SMSG_SKILL_CASTING 0x07fb #define SMSG_SKILL_CAST_CANCEL 0x01b9 diff --git a/src/net/familyhandler.h b/src/net/familyhandler.h index 4b522d24a..07f28bfac 100644 --- a/src/net/familyhandler.h +++ b/src/net/familyhandler.h @@ -25,6 +25,8 @@ #include "localconsts.h" +class Being; + namespace Net { @@ -33,6 +35,8 @@ class FamilyHandler notfinal public: virtual ~FamilyHandler() { } + + virtual void askForChild(const Being *const being) = 0; }; } // namespace Net diff --git a/src/net/tmwa/familyhandler.cpp b/src/net/tmwa/familyhandler.cpp index 0b372e939..abdcb5e4b 100644 --- a/src/net/tmwa/familyhandler.cpp +++ b/src/net/tmwa/familyhandler.cpp @@ -42,4 +42,8 @@ void FamilyHandler::handleMessage(Net::MessageIn &msg A_UNUSED) { } +void FamilyHandler::askForChild(const Being *const being A_UNUSED) +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/familyhandler.h b/src/net/tmwa/familyhandler.h index 14ef0a1a5..8e09b7a12 100644 --- a/src/net/tmwa/familyhandler.h +++ b/src/net/tmwa/familyhandler.h @@ -37,6 +37,8 @@ class FamilyHandler final : public MessageHandler, A_DELETE_COPY(FamilyHandler) void handleMessage(Net::MessageIn &msg) override final; + + void askForChild(const Being *const being) override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50