From c0d2d172cf6397329b0474e8521af666edc6f774 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 Aug 2014 22:35:37 +0300 Subject: Remove additional parameters from processBeingChat function. --- src/net/ea/chathandler.cpp | 6 ++++-- src/net/ea/chathandler.h | 3 +-- src/net/ea/eaprotocol.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/net/ea') 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 -- cgit v1.2.3-70-g09d2