summaryrefslogtreecommitdiff
path: root/src/net/eathena/familyhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/familyhandler.cpp')
-rw-r--r--src/net/eathena/familyhandler.cpp18
1 files changed, 14 insertions, 4 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");