From f75fd62e61bf7a1a5b79b59bdbe44af71b6d23b0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 20 Mar 2016 17:39:23 +0300 Subject: Impliment packet SMSG_FAMILY_ASK_FOR_CHILD_REPLY. --- src/enums/resources/notifytypes.h | 3 +++ src/net/eathena/familyrecv.cpp | 18 ++++++++++++++++-- src/resources/notifications.h | 13 +++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h index 84f875c91..8d615caa2 100644 --- a/src/enums/resources/notifytypes.h +++ b/src/enums/resources/notifytypes.h @@ -222,6 +222,9 @@ namespace NotifyTypes DIVORCED, CALLED_PARTNER, CALLING_PARTNER, + ADOPT_CHILD_ERROR_HAVE_BABY, + ADOPT_CHILD_ERROR_LEVEL, + ADOPT_CHILD_ERROR_BABY_MARRIED, TYPE_END }; diff --git a/src/net/eathena/familyrecv.cpp b/src/net/eathena/familyrecv.cpp index 7b0e9fa01..07b1f343a 100644 --- a/src/net/eathena/familyrecv.cpp +++ b/src/net/eathena/familyrecv.cpp @@ -105,8 +105,22 @@ void FamilyRecv::processDivorced(Net::MessageIn &msg) void FamilyRecv::processAskForChildReply(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readInt32("type"); + const int type = msg.readInt32("type"); + switch (type) + { + case 0: + NotifyManager::notify(NotifyTypes::ADOPT_CHILD_ERROR_HAVE_BABY); + break; + case 1: + NotifyManager::notify(NotifyTypes::ADOPT_CHILD_ERROR_LEVEL); + break; + case 2: + NotifyManager::notify(NotifyTypes::ADOPT_CHILD_ERROR_BABY_MARRIED); + break; + default: + UNIMPLIMENTEDPACKETFIELD(type); + break; + } } } // namespace EAthena diff --git a/src/resources/notifications.h b/src/resources/notifications.h index e726e8093..1139602f2 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -803,6 +803,19 @@ namespace NotifyManager // TRANSLATORS: notification message N_("You calling partner %s."), NotifyFlags::STRING}, + {"adopt child error have baby", + // TRANSLATORS: notification message + N_("Adoption child error. You already have baby."), + NotifyFlags::EMPTY}, + {"adopt child error level", + // TRANSLATORS: notification message + N_("Adoption child error. You level too small for have baby."), + NotifyFlags::EMPTY}, + {"adopt child error baby married", + // TRANSLATORS: notification message + N_("Adoption child error. This player already " + "married and can't be baby."), + NotifyFlags::EMPTY}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H -- cgit v1.2.3-70-g09d2