diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-21 12:50:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-21 12:50:02 +0300 |
commit | 0fa16439e6419827579d3c4e33e4e6bd6788b9ff (patch) | |
tree | 09d75f764c2f6c8761947ca97d9a5fdea4a9275e /src/net | |
parent | ac5b6771c50c97dc667611a104acb8c87cf65231 (diff) | |
download | mv-0fa16439e6419827579d3c4e33e4e6bd6788b9ff.tar.gz mv-0fa16439e6419827579d3c4e33e4e6bd6788b9ff.tar.bz2 mv-0fa16439e6419827579d3c4e33e4e6bd6788b9ff.tar.xz mv-0fa16439e6419827579d3c4e33e4e6bd6788b9ff.zip |
Show readable server messages for some limits.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 50d4569dc..9e1954679 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -337,13 +337,36 @@ void ChatHandler::processChat(Net::MessageIn &msg) void ChatHandler::processFormatMessage(Net::MessageIn &msg) { - int msgId = msg.readInt16("msg id"); + const int msgId = msg.readInt16("msg id"); // +++ here need load message from configuration file - const std::string chatMsg = strprintf("Message #%d", msgId); + std::string chatMsg; if (msgId >= 1266 && msgId <= 1269) + { mercenaryHandler->handleMercenaryMessage(msgId - 1266); - else - processChatContinue(chatMsg, ChatMsgType::BY_SERVER); + return; + } + switch (msgId) + { + case 1334: + chatMsg = _("Can't cast skill in this area."); + break; + case 1335: + chatMsg = _("Can't use item in this area."); + break; + case 1773: + chatMsg = _("Can't equip. Wrong level."); + break; + case 1774: + chatMsg = _("Can't use. Wrong level."); + break; + case 1923: + chatMsg = _("Work in progress."); // busy with npc + break; + default: + chatMsg = strprintf("Message #%d", msgId); + break; + } + processChatContinue(chatMsg, ChatMsgType::BY_SERVER); } void ChatHandler::processFormatMessageNumber(Net::MessageIn &msg) |