diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-07 17:00:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-07 17:00:44 +0300 |
commit | c277f3e829217cd7469a4a5c742ef617a57e8e3f (patch) | |
tree | c7ca9d208c89ca61e75a49d4dc626e0af26812d4 /src/net/eathena/familyhandler.cpp | |
parent | 3dbb94e740268181f9642d065e57520c1199c355 (diff) | |
download | mv-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.gz mv-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.bz2 mv-c277f3e829217cd7469a4a5c742ef617a57e8e3f.tar.xz mv-c277f3e829217cd7469a4a5c742ef617a57e8e3f.zip |
eathena: add partial support for packet SMSG_FAMILY_CALL_PARTNER 0x01e6.
Also rename family related packages.
Diffstat (limited to 'src/net/eathena/familyhandler.cpp')
-rw-r--r-- | src/net/eathena/familyhandler.cpp | 18 |
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"); |