mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
cleanup: remove dead pos=0 reassignment and demote chat logs to DEBUG
Quest log had a redundant pos=0 right after initialization. Chat handler logged every incoming/outgoing message at WARNING level, flooding the log and obscuring genuine warnings.
This commit is contained in:
parent
a30c7f4b1a
commit
0795430390
2 changed files with 4 additions and 5 deletions
|
|
@ -120,7 +120,7 @@ void ChatHandler::sendChatMessage(ChatType type, const std::string& message, con
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_WARNING("OUTGOING CHAT: type=", static_cast<int>(type), " msg='", message.substr(0, 60), "'");
|
LOG_DEBUG("OUTGOING CHAT: type=", static_cast<int>(type), " msg='", message.substr(0, 60), "'");
|
||||||
|
|
||||||
// Use the player's faction language. AzerothCore rejects wrong language.
|
// Use the player's faction language. AzerothCore rejects wrong language.
|
||||||
// Alliance races: Human(1), Dwarf(3), NightElf(4), Gnome(7), Draenei(11) → COMMON (7)
|
// Alliance races: Human(1), Dwarf(3), NightElf(4), Gnome(7), Draenei(11) → COMMON (7)
|
||||||
|
|
@ -165,9 +165,9 @@ void ChatHandler::handleMessageChat(network::Packet& packet) {
|
||||||
LOG_WARNING("Failed to parse SMSG_MESSAGECHAT, size=", packet.getSize());
|
LOG_WARNING("Failed to parse SMSG_MESSAGECHAT, size=", packet.getSize());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_WARNING("SMSG_MESSAGECHAT: type=", static_cast<int>(data.type),
|
LOG_DEBUG("SMSG_MESSAGECHAT: type=", static_cast<int>(data.type),
|
||||||
" sender='", data.senderName, "' msg='",
|
" sender='", data.senderName, "' msg='",
|
||||||
data.message.substr(0, 60), "'");
|
data.message.substr(0, 60), "'");
|
||||||
|
|
||||||
// Skip server echo of our own messages (we already added a local echo)
|
// Skip server echo of our own messages (we already added a local echo)
|
||||||
if (data.senderGuid == owner_.playerGuid && data.senderGuid != 0) {
|
if (data.senderGuid == owner_.playerGuid && data.senderGuid != 0) {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ std::string replaceGenderPlaceholders(const std::string& text, game::GameHandler
|
||||||
|
|
||||||
// Replace $g placeholders
|
// Replace $g placeholders
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
pos = 0;
|
|
||||||
while ((pos = result.find('$', pos)) != std::string::npos) {
|
while ((pos = result.find('$', pos)) != std::string::npos) {
|
||||||
if (pos + 1 >= result.length()) break;
|
if (pos + 1 >= result.length()) break;
|
||||||
char marker = result[pos + 1];
|
char marker = result[pos + 1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue