summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
commit19b82b4dad9b66418a4e7d0ed0ba23d0cab17216 (patch)
tree0f82530b8e11d70923e96d5ba17107f92921365f /src/net
parentb49d05166ac67ed0ef189b1e3859573108843db1 (diff)
downloadplus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.gz
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.bz2
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.xz
plus-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.zip
Remove default parameters from Being::setSpeech.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/chatrecv.cpp4
-rw-r--r--src/net/tmwa/chatrecv.cpp27
-rw-r--r--src/net/tmwa/chatrecv.h3
3 files changed, 14 insertions, 20 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp
index 2748d76d7..60033bf55 100644
--- a/src/net/eathena/chatrecv.cpp
+++ b/src/net/eathena/chatrecv.cpp
@@ -262,7 +262,7 @@ void ChatRecv::processChatContinue(std::string chatMsg,
if (localPlayer != nullptr)
{
if (((chatWindow != nullptr) || Ea::ChatRecv::mShowMotd) && allow)
- localPlayer->setSpeech(chatMsg, GENERAL_CHANNEL);
+ localPlayer->setSpeech(chatMsg);
}
BLOCK_END("ChatRecv::processChat")
}
@@ -563,7 +563,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.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);