From 31aad897b3bd0951bb9c0eb34bd8636fdfdfa87c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 23:05:32 +0300 Subject: Impliment packet SMSG_IGNORE_NICK_ACK. --- src/net/eathena/chathandler.cpp | 46 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) (limited to 'src/net/eathena/chathandler.cpp') 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 -- cgit v1.2.3-60-g2f50