diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-05 22:03:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-06 01:56:21 +0300 |
commit | 75ddffb8941594a218ec23f86b8c16b5d54b728a (patch) | |
tree | 9c0e28efcc32d69fdd57b03d21ce2b9307a7e387 /src/net | |
parent | b956661094109ae89ea87550cec5a9a6ed9eaa90 (diff) | |
download | manaplus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.gz manaplus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.bz2 manaplus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.xz manaplus-75ddffb8941594a218ec23f86b8c16b5d54b728a.zip |
eathena: impliment packet SMSG_CHAT_ROOM_ROLE_CHANGE.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index f4dd9c937..6aca795c2 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -959,9 +959,20 @@ void ChatHandler::processChatRoomSettings(Net::MessageIn &msg) void ChatHandler::processChatRoomRoleChange(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readInt32("role"); - msg.readString(24, "name"); + const int role = msg.readInt32("role"); + const std::string name = msg.readString(24, "name"); + switch(role) + { + case 0: + NotifyManager::notify(NotifyTypes::ROOM_ROLE_OWNER, name); + break; + case 1: + // dont show normal role + break; + default: + UNIMPLIMENTEDPACKET; + break; + } } void ChatHandler::processMVPItem(Net::MessageIn &msg) |