aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index bef57fd0a45..85d03fc2fd1 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17071,6 +17071,10 @@ void Player::Say(const std::string& text, const uint32 language)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_SAY, text, language);
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),true);
+
+ if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC))
+ sLog.outChat("[SAY] Player %s says (language %u): %s",
+ GetName(), language, text.c_str());
}
void Player::Yell(const std::string& text, const uint32 language)
@@ -17078,6 +17082,10 @@ void Player::Yell(const std::string& text, const uint32 language)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_YELL, text, language);
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),true);
+
+ if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC))
+ sLog.outChat("[YELL] Player %s yells (language %u): %s",
+ GetName(), language, text.c_str());
}
void Player::TextEmote(const std::string& text)
@@ -17085,6 +17093,10 @@ void Player::TextEmote(const std::string& text)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_EMOTE, text, LANG_UNIVERSAL);
SendMessageToSetInRange(&data,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),true, !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT), true );
+
+ if(sWorld.getConfig(CONFIG_CHATLOG_PUBLIC))
+ sLog.outChat("[TEXTEMOTE] Player %s emotes: %s",
+ GetName(), text.c_str());
}
void Player::Whisper(const std::string& text, uint32 language,uint64 receiver)
@@ -17094,6 +17106,10 @@ void Player::Whisper(const std::string& text, uint32 language,uint64 receiver)
Player *rPlayer = objmgr.GetPlayer(receiver);
+ if(sWorld.getConfig(CONFIG_CHATLOG_WHISPER))
+ sLog.outChat("[WHISPER] Player %s tells %s: %s",
+ GetName(), rPlayer->GetName(), text.c_str());
+
// when player you are whispering to is dnd, he cannot receive your message, unless you are in gm mode
if(!rPlayer->isDND() || isGameMaster())
{