summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-03 22:05:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-03 22:05:00 +0300
commit13b4a16c46983b786d31f6cf67632a3bd4e14b8f (patch)
tree3119ff5b25c671bd78cc1a2bda9997a13bf6b15d /src/net/eathena/chathandler.cpp
parenta10b859b3874ee4343116ae391f6634da1889be5 (diff)
downloadmanaplus-13b4a16c46983b786d31f6cf67632a3bd4e14b8f.tar.gz
manaplus-13b4a16c46983b786d31f6cf67632a3bd4e14b8f.tar.bz2
manaplus-13b4a16c46983b786d31f6cf67632a3bd4e14b8f.tar.xz
manaplus-13b4a16c46983b786d31f6cf67632a3bd4e14b8f.zip
Impliment manner messages.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index d60661b9f..57d57ca6c 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -23,6 +23,7 @@
#include "net/eathena/chathandler.h"
#include "actormanager.h"
+#include "notifymanager.h"
#include "being/localplayer.h"
#include "being/playerrelations.h"
@@ -40,6 +41,7 @@
#include "net/eathena/protocol.h"
#include "resources/chatobject.h"
+#include "resources/notifytypes.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -904,15 +906,37 @@ void ChatHandler::processMVPNoItem(Net::MessageIn &msg)
void ChatHandler::processMannerMessage(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readInt32("type");
+ const int result = msg.readInt32("type");
+ switch(result)
+ {
+ case 0:
+ NotifyManager::notify(NotifyTypes::MANNER_CHANGED);
+ break;
+ case 5:
+ break;
+ default:
+ UNIMPLIMENTEDPACKET;
+ break;
+ }
}
void ChatHandler::processChatSilence(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readUInt8("type");
- msg.readString(24, "gm name");
+ const int result = msg.readUInt8("type");
+ const std::string name = msg.readString(24, "gm name");
+
+ switch (result)
+ {
+ case 0:
+ NotifyManager::notify(NotifyTypes::MANNER_POSITIVE_POINTS, name);
+ break;
+ case 1:
+ NotifyManager::notify(NotifyTypes::MANNER_NEGATIVE_POINTS, name);
+ break;
+ default:
+ UNIMPLIMENTEDPACKET;
+ break;
+ }
}
void ChatHandler::processChatTalkieBox(Net::MessageIn &msg)