summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-07 17:00:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-07 17:00:44 +0300
commitc277f3e829217cd7469a4a5c742ef617a57e8e3f (patch)
treec7ca9d208c89ca61e75a49d4dc626e0af26812d4 /src/net/eathena
parent3dbb94e740268181f9642d065e57520c1199c355 (diff)
downloadplus-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.gz
plus-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.bz2
plus-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.xz
plus-c277f3e829217cd7469a4a5c742ef617a57e8e3f.zip
eathena: add partial support for packet SMSG_FAMILY_CALL_PARTNER 0x01e6.
Also rename family related packages.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/familyhandler.cpp18
-rw-r--r--src/net/eathena/familyhandler.h2
-rw-r--r--src/net/eathena/protocol.h7
3 files changed, 20 insertions, 7 deletions
diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp
index b222977ff..d32ce8409 100644
--- a/src/net/eathena/familyhandler.cpp
+++ b/src/net/eathena/familyhandler.cpp
@@ -39,7 +39,8 @@ FamilyHandler::FamilyHandler() :
{
static const uint16_t _messages[] =
{
- SMSG_ASK_FOR_CHILD,
+ SMSG_FAMILY_ASK_FOR_CHILD,
+ SMSG_FAMILY_CALL_PARTNER,
0
};
handledMessages = _messages;
@@ -50,10 +51,14 @@ void FamilyHandler::handleMessage(Net::MessageIn &msg)
{
switch (msg.getId())
{
- case SMSG_ASK_FOR_CHILD:
+ case SMSG_FAMILY_ASK_FOR_CHILD:
processAskForChild(msg);
break;
+ case SMSG_FAMILY_CALL_PARTNER:
+ processCallPartner(msg);
+ break;
+
default:
break;
}
@@ -64,7 +69,7 @@ void FamilyHandler::askForChild(const Being *const being)
if (!being)
return;
- createOutPacket(CMSG_ASK_FOR_CHILD);
+ createOutPacket(CMSG_FAMILY_ASK_FOR_CHILD);
outMsg.writeInt32(being->getId());
}
@@ -75,9 +80,14 @@ void FamilyHandler::processAskForChild(Net::MessageIn &msg)
msg.readString(24, "name who ask");
}
+void FamilyHandler::processCallPartner(Net::MessageIn &msg)
+{
+ msg.readString(24, "name");
+}
+
void FamilyHandler::askForChildReply(const bool accept)
{
- createOutPacket(CMSG_ASK_FOR_CHILD_REPLY);
+ createOutPacket(CMSG_FAMILY_ASK_FOR_CHILD_REPLY);
outMsg.writeInt32(mParent1, "parent1");
outMsg.writeInt32(mParent2, "parent2");
outMsg.writeInt32(accept ? 0: 1, "result");
diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h
index 365a129ba..90a6f4afa 100644
--- a/src/net/eathena/familyhandler.h
+++ b/src/net/eathena/familyhandler.h
@@ -44,6 +44,8 @@ class FamilyHandler final : public MessageHandler,
protected:
void processAskForChild(Net::MessageIn &msg);
+ void processCallPartner(Net::MessageIn &msg);
+
private:
int mParent1;
int mParent2;
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index eeaf14fcc..ae1bec131 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -235,7 +235,8 @@
#define SMSG_MAIL_OPEN_WINDOW 0x0260
-#define SMSG_ASK_FOR_CHILD 0x01f6
+#define SMSG_FAMILY_ASK_FOR_CHILD 0x01f6
+#define SMSG_FAMILY_CALL_PARTNER 0x01e6
#define SMSG_PET_MESSAGE 0x01aa
#define SMSG_PET_ROULETTE 0x01a0
@@ -459,8 +460,8 @@
#define CMSG_MAIL_RESET_ATTACH 0x0246
#define CMSG_MAIL_SEND 0x0248
-#define CMSG_ASK_FOR_CHILD 0x01f9
-#define CMSG_ASK_FOR_CHILD_REPLY 0x01f7
+#define CMSG_FAMILY_ASK_FOR_CHILD 0x01f9
+#define CMSG_FAMILY_ASK_FOR_CHILD_REPLY 0x01f7
#define CMSG_BANK_DEPOSIT 0x09a7
#define CMSG_BANK_WITHDRAW 0x09a9