summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 21:38:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 21:38:58 +0300
commit9743b3341693f71bcaf62a979ec25b249eb0d39b (patch)
tree720a0862ae1a3ebc7ebff60d0704334b07609d8a /src
parentc259c8285f394a56a42fb07eb2aa2e033b346954 (diff)
downloadmanaplus-9743b3341693f71bcaf62a979ec25b249eb0d39b.tar.gz
manaplus-9743b3341693f71bcaf62a979ec25b249eb0d39b.tar.bz2
manaplus-9743b3341693f71bcaf62a979ec25b249eb0d39b.tar.xz
manaplus-9743b3341693f71bcaf62a979ec25b249eb0d39b.zip
eathena: add packet CMSG_ASK_FOR_CHILD_REPLY 0x01f7.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/familyhandler.cpp12
-rw-r--r--src/net/eathena/familyhandler.h6
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/familyhandler.h2
-rw-r--r--src/net/tmwa/familyhandler.cpp4
-rw-r--r--src/net/tmwa/familyhandler.h2
6 files changed, 26 insertions, 1 deletions
diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp
index 44661a0a5..b0135a4f3 100644
--- a/src/net/eathena/familyhandler.cpp
+++ b/src/net/eathena/familyhandler.cpp
@@ -37,7 +37,9 @@ namespace EAthena
{
FamilyHandler::FamilyHandler() :
- MessageHandler()
+ MessageHandler(),
+ mParent1(0),
+ mParent2(0)
{
static const uint16_t _messages[] =
{
@@ -77,4 +79,12 @@ void FamilyHandler::processAskForChild(Net::MessageIn &msg)
msg.readString(24, "name who ask");
}
+void FamilyHandler::askForChildReply(const bool accept)
+{
+ MessageOut outMsg(CMSG_ASK_FOR_CHILD_REPLY);
+ outMsg.writeInt32(mParent1, "parent1");
+ outMsg.writeInt32(mParent2, "parent2");
+ outMsg.writeInt32(accept ? 0: 1, "result");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h
index f96f2aeac..5d3062e22 100644
--- a/src/net/eathena/familyhandler.h
+++ b/src/net/eathena/familyhandler.h
@@ -41,8 +41,14 @@ class FamilyHandler final : public MessageHandler,
void askForChild(const Being *const being) override final;
+ void askForChildReply(const bool accept) override final;
+
protected:
void processAskForChild(Net::MessageIn &msg);
+
+ private:
+ int mParent1;
+ int mParent2;
};
} // namespace EAthena
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index c0231aa54..123db93f8 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -378,6 +378,7 @@
#define CMSG_MAIL_SEND 0x0248
#define CMSG_ASK_FOR_CHILD 0x01f9
+#define CMSG_ASK_FOR_CHILD_REPLY 0x01f7
#define SMSG_SOLVE_CHAR_NAME 0x0194
#define SMSG_SKILL_CASTING 0x07fb
diff --git a/src/net/familyhandler.h b/src/net/familyhandler.h
index 07f28bfac..e6b7bb174 100644
--- a/src/net/familyhandler.h
+++ b/src/net/familyhandler.h
@@ -37,6 +37,8 @@ class FamilyHandler notfinal
{ }
virtual void askForChild(const Being *const being) = 0;
+
+ virtual void askForChildReply(const bool accept) = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/familyhandler.cpp b/src/net/tmwa/familyhandler.cpp
index abdcb5e4b..af620c0d5 100644
--- a/src/net/tmwa/familyhandler.cpp
+++ b/src/net/tmwa/familyhandler.cpp
@@ -46,4 +46,8 @@ void FamilyHandler::askForChild(const Being *const being A_UNUSED)
{
}
+void FamilyHandler::askForChildReply(const bool accept A_UNUSED)
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/familyhandler.h b/src/net/tmwa/familyhandler.h
index 8e09b7a12..93d0928f1 100644
--- a/src/net/tmwa/familyhandler.h
+++ b/src/net/tmwa/familyhandler.h
@@ -39,6 +39,8 @@ class FamilyHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
void askForChild(const Being *const being) override final;
+
+ void askForChildReply(const bool accept) override final;
};
} // namespace TmwAthena