summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-29 22:35:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-30 16:37:01 +0300
commitc0d2d172cf6397329b0474e8521af666edc6f774 (patch)
treea7f8bfda6fa4ac0ce020e8b66c1d819d83d27ece /src
parent03763e4b290b80bc5606568b168f8605d7aa1631 (diff)
downloadplus-c0d2d172cf6397329b0474e8521af666edc6f774.tar.gz
plus-c0d2d172cf6397329b0474e8521af666edc6f774.tar.bz2
plus-c0d2d172cf6397329b0474e8521af666edc6f774.tar.xz
plus-c0d2d172cf6397329b0474e8521af666edc6f774.zip
Remove additional parameters from processBeingChat function.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/chathandler.cpp6
-rw-r--r--src/net/ea/chathandler.h3
-rw-r--r--src/net/ea/eaprotocol.h1
-rw-r--r--src/net/eathena/chathandler.cpp2
-rw-r--r--src/net/tmwa/chathandler.cpp4
5 files changed, 9 insertions, 7 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 2f7e0f661..b92948335 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -37,6 +37,8 @@
#include "net/messagein.h"
+#include "net/ea/eaprotocol.h"
+
#include "resources/notifytypes.h"
#include "utils/gettext.h"
@@ -264,13 +266,13 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) const
BLOCK_END("ChatHandler::processWhisper")
}
-void ChatHandler::processBeingChat(Net::MessageIn &msg,
- const bool channels) const
+void ChatHandler::processBeingChat(Net::MessageIn &msg) const
{
if (!actorManager)
return;
BLOCK_START("ChatHandler::processBeingChat")
+ const bool channels = msg.getId() == SMSG_BEING_CHAT2;
int chatMsgLength = msg.readInt16() - 8;
Being *const being = actorManager->findBeing(msg.readInt32());
if (!being)
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 708d79440..d7865a83b 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -52,8 +52,7 @@ class ChatHandler notfinal : public Net::ChatHandler
virtual void processWhisper(Net::MessageIn &msg) const;
- virtual void processBeingChat(Net::MessageIn &msg,
- const bool channels) const;
+ virtual void processBeingChat(Net::MessageIn &msg) const;
virtual void processChat(Net::MessageIn &msg, const bool normalChat,
const bool channels);
diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h
index 401d09177..d315083de 100644
--- a/src/net/ea/eaprotocol.h
+++ b/src/net/ea/eaprotocol.h
@@ -68,6 +68,7 @@ enum
static const int INVENTORY_OFFSET = 2;
static const int STORAGE_OFFSET = 1;
+#define SMSG_BEING_CHAT2 0x0223 /**< A being talks in channels */
#define SMSG_PLAYER_INVENTORY 0x01ee
#endif // NET_EA_EAPROTOCOL_H
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index daa3891e8..cc1a5907e 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -70,7 +70,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
// Received speech from being
case SMSG_BEING_CHAT:
- processBeingChat(msg, false);
+ processBeingChat(msg);
break;
case SMSG_PLAYER_CHAT:
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 23401799c..65a136570 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -75,12 +75,12 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
// Received speech from being
case SMSG_BEING_CHAT:
- processBeingChat(msg, false);
+ processBeingChat(msg);
break;
// Received speech from being
case SMSG_BEING_CHAT2:
- processBeingChat(msg, true);
+ processBeingChat(msg);
break;
case SMSG_PLAYER_CHAT: