diff options
-rw-r--r-- | src/enums/resources/notifytypes.h | 2 | ||||
-rw-r--r-- | src/net/eathena/familyrecv.cpp | 13 | ||||
-rw-r--r-- | src/resources/notifications.h | 8 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h index e5f465428..84f875c91 100644 --- a/src/enums/resources/notifytypes.h +++ b/src/enums/resources/notifytypes.h @@ -220,6 +220,8 @@ namespace NotifyTypes BEING_REMOVE_TRICK_DEAD, BEING_REMOVE_UNKNOWN, DIVORCED, + CALLED_PARTNER, + CALLING_PARTNER, TYPE_END }; diff --git a/src/net/eathena/familyrecv.cpp b/src/net/eathena/familyrecv.cpp index 5a689bb67..995c00a8b 100644 --- a/src/net/eathena/familyrecv.cpp +++ b/src/net/eathena/familyrecv.cpp @@ -23,6 +23,8 @@ #include "logger.h" #include "notifymanager.h" +#include "being/localplayer.h" + #include "enums/resources/notifytypes.h" #include "net/messagein.h" @@ -48,8 +50,15 @@ void FamilyRecv::processAskForChild(Net::MessageIn &msg) void FamilyRecv::processCallPartner(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readString(24, "name"); + const std::string name = msg.readString(24, "name"); + if (localPlayer && name == localPlayer->getName()) + { + NotifyManager::notify(NotifyTypes::CALLED_PARTNER); + } + else + { + NotifyManager::notify(NotifyTypes::CALLING_PARTNER, name.c_str()); + } } void FamilyRecv::processDivorced(Net::MessageIn &msg) diff --git a/src/resources/notifications.h b/src/resources/notifications.h index abb5efe56..e726e8093 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -795,6 +795,14 @@ namespace NotifyManager // TRANSLATORS: notification message N_("You and %s was divorced."), NotifyFlags::STRING}, + {"partner called", + // TRANSLATORS: notification message + N_("You was called by partner."), + NotifyFlags::EMPTY}, + {"partner calling", + // TRANSLATORS: notification message + N_("You calling partner %s."), + NotifyFlags::STRING}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H |