summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-19 23:28:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-19 23:28:10 +0300
commite7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3 (patch)
treee8181ee1ab513874cdba1a5e1024738f4cde77cb
parente29f5cfd16b4566141ee48fa1c58b606e14b66f7 (diff)
downloadmanaverse-e7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3.tar.gz
manaverse-e7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3.tar.bz2
manaverse-e7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3.tar.xz
manaverse-e7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3.zip
Impliment packet SMSG_FAMILY_CALL_PARTNER (hercules).
-rw-r--r--src/enums/resources/notifytypes.h2
-rw-r--r--src/net/eathena/familyrecv.cpp13
-rw-r--r--src/resources/notifications.h8
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