From 19b82b4dad9b66418a4e7d0ed0ba23d0cab17216 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 16 Dec 2017 02:19:08 +0300 Subject: Remove default parameters from Being::setSpeech. --- src/net/tmwa/chatrecv.cpp | 27 +++++++++++---------------- src/net/tmwa/chatrecv.h | 3 +-- 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index a23dc92a4..42cac06f4 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -59,11 +59,10 @@ void ChatRecv::processChat(Net::MessageIn &msg) return; } - processChatContinue(msg.readRawString(chatMsgLength, "message"), ""); + processChatContinue(msg.readRawString(chatMsgLength, "message")); } -void ChatRecv::processChatContinue(std::string chatMsg, - const std::string &channel) +void ChatRecv::processChatContinue(std::string chatMsg) { const size_t pos = chatMsg.find(" : ", 0); @@ -72,25 +71,21 @@ void ChatRecv::processChatContinue(std::string chatMsg, { allow = chatWindow->resortChatLog(chatMsg, ChatMsgType::BY_PLAYER, - channel, + GENERAL_CHANNEL, IgnoreRecord_false, TryRemoveColors_true); } - if (channel.empty()) + const std::string senseStr("You sense the following: "); + if ((actorManager != nullptr) && (chatMsg.find(senseStr) == 0u)) { - const std::string senseStr("You sense the following: "); - if ((actorManager != nullptr) && (chatMsg.find(senseStr) == 0u)) - { - actorManager->parseLevels( - chatMsg.substr(senseStr.size())); - } + actorManager->parseLevels( + chatMsg.substr(senseStr.size())); } if (pos == std::string::npos && !Ea::ChatRecv::mShowMotd && - Ea::ChatRecv::mSkipping && - channel.empty()) + Ea::ChatRecv::mSkipping) { // skip motd from "new" tmw server if (Ea::ChatRecv::mMotdTime == 0) @@ -113,8 +108,8 @@ void ChatRecv::processChatContinue(std::string chatMsg, if (localPlayer != nullptr) { - if (((chatWindow != nullptr) || Ea::ChatRecv::mShowMotd) && allow) - localPlayer->setSpeech(chatMsg, channel); + if ((chatWindow != nullptr || Ea::ChatRecv::mShowMotd) && allow) + localPlayer->setSpeech(chatMsg); } BLOCK_END("ChatRecv::processChat") } @@ -367,7 +362,7 @@ void ChatRecv::processBeingChat(Net::MessageIn &msg) playerRelations.hasPermission(sender_name, PlayerRelation::SPEECH_FLOAT)) { - being->setSpeech(chatMsg, GENERAL_CHANNEL); + being->setSpeech(chatMsg); } BLOCK_END("ChatRecv::processBeingChat") } diff --git a/src/net/tmwa/chatrecv.h b/src/net/tmwa/chatrecv.h index 3e7b58b15..d5995d8ef 100644 --- a/src/net/tmwa/chatrecv.h +++ b/src/net/tmwa/chatrecv.h @@ -35,8 +35,7 @@ namespace TmwAthena namespace ChatRecv { void processChat(Net::MessageIn &msg); - void processChatContinue(std::string chatMsg, - const std::string &channel); + void processChatContinue(std::string chatMsg); void processGmChat(Net::MessageIn &msg); void processWhisper(Net::MessageIn &msg); void processWhisperResponse(Net::MessageIn &msg); -- cgit v1.2.3-60-g2f50