summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 23:05:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 23:05:32 +0300
commit31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c (patch)
treeeff25e4c406675e19a6c40c727c828f040a8eeed
parent7f716b84fcad512a49e3122bc1bc49f3c5437cc8 (diff)
downloadmanaplus-31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c.tar.gz
manaplus-31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c.tar.bz2
manaplus-31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c.tar.xz
manaplus-31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c.zip
Impliment packet SMSG_IGNORE_NICK_ACK.
-rw-r--r--src/enums/resources/notifytypes.h8
-rw-r--r--src/net/eathena/chathandler.cpp46
-rw-r--r--src/resources/notifications.h32
3 files changed, 83 insertions, 3 deletions
diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h
index 9aa56282b..f04ce2dc9 100644
--- a/src/enums/resources/notifytypes.h
+++ b/src/enums/resources/notifytypes.h
@@ -194,6 +194,14 @@ namespace NotifyTypes
SKILL_FLEE_PLUS_50,
SKILL_FULL_STRIP_FAILED,
SKILL_MESSAGE_UNKNOWN,
+ IGNORE_PLAYER_SUCCESS,
+ IGNORE_PLAYER_FAILURE,
+ IGNORE_PLAYER_TOO_MANY,
+ IGNORE_PLAYER_UNKNOWN,
+ UNIGNORE_PLAYER_SUCCESS,
+ UNIGNORE_PLAYER_FAILURE,
+ UNIGNORE_PLAYER_UNKNOWN,
+ IGNORE_PLAYER_TYPE_UNKNOWN,
TYPE_END
};
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 5d5e889d9..13dd438d8 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -378,9 +378,49 @@ void ChatHandler::unIgnore(const std::string &nick) const
void ChatHandler::processIgnoreNickAck(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readUInt8("type");
- msg.readUInt8("flag");
+ const int type = msg.readUInt8("type");
+ const int flag = msg.readUInt8("flag");
+ switch (type)
+ {
+ case 0:
+ switch (flag)
+ {
+ case 0:
+ NotifyManager::notify(NotifyTypes::IGNORE_PLAYER_SUCCESS);
+ break;
+ case 1:
+ NotifyManager::notify(NotifyTypes::IGNORE_PLAYER_FAILURE);
+ break;
+ case 2:
+ NotifyManager::notify(NotifyTypes::IGNORE_PLAYER_TOO_MANY);
+ break;
+ default:
+ NotifyManager::notify(NotifyTypes::IGNORE_PLAYER_UNKNOWN);
+ break;
+ }
+ break;
+ case 1:
+ switch (flag)
+ {
+ case 0:
+ NotifyManager::notify(
+ NotifyTypes::UNIGNORE_PLAYER_SUCCESS);
+ break;
+ case 1:
+ NotifyManager::notify(
+ NotifyTypes::UNIGNORE_PLAYER_FAILURE);
+ break;
+ default:
+ NotifyManager::notify(
+ NotifyTypes::UNIGNORE_PLAYER_UNKNOWN);
+ break;
+ }
+ break;
+
+ default:
+ NotifyManager::notify(NotifyTypes::IGNORE_PLAYER_TYPE_UNKNOWN);
+ break;
+ }
}
void ChatHandler::requestIgnoreList() const
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 44044afcf..946889596 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -702,6 +702,38 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("Unknown skill message."),
NotifyFlags::EMPTY},
+ {"ignore player success",
+ // TRANSLATORS: notification message
+ N_("Player succesfully ignored."),
+ NotifyFlags::EMPTY},
+ {"ignore player failure",
+ // TRANSLATORS: notification message
+ N_("Player ignore failed."),
+ NotifyFlags::EMPTY},
+ {"ignore player too many",
+ // TRANSLATORS: notification message
+ N_("Player ignore failed. Because too many ignores."),
+ NotifyFlags::EMPTY},
+ {"ignore player unknown",
+ // TRANSLATORS: notification message
+ N_("Unknown player ignore failure."),
+ NotifyFlags::EMPTY},
+ {"unignore player success",
+ // TRANSLATORS: notification message
+ N_("Player succesfully unignored."),
+ NotifyFlags::EMPTY},
+ {"unignore player failure",
+ // TRANSLATORS: notification message
+ N_("Player unignore failed."),
+ NotifyFlags::EMPTY},
+ {"unignore player unknown",
+ // TRANSLATORS: notification message
+ N_("Unknown player unignore failure."),
+ NotifyFlags::EMPTY},
+ {"ignore unknown type",
+ // TRANSLATORS: notification message
+ N_("Unknown ignore type."),
+ NotifyFlags::EMPTY},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H