From c277f3e829217cd7469a4a5c742ef617a57e8e3f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Oct 2014 17:00:44 +0300 Subject: eathena: add partial support for packet SMSG_FAMILY_CALL_PARTNER 0x01e6. Also rename family related packages. --- src/net/eathena/familyhandler.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/net/eathena/familyhandler.cpp') 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"); -- cgit v1.2.3-70-g09d2