mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Scripts/ChatLogger): Differentiate addon whisper from player whisper (#19441)
* fix(Scripts/ChatLogger): Differentiate addon whisper from player whisper * closes https://github.com/azerothcore/azerothcore-wotlk/issues/19439 * closes https://github.com/azerothcore/azerothcore-wotlk/issues/17570 * fix build
This commit is contained in:
@@ -64,10 +64,15 @@ public:
|
||||
player->GetName(), chatType, lang, msg);
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player* receiver) override
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
|
||||
{
|
||||
LOG_INFO("chat.whisper", "Player {} tells {}: {}",
|
||||
player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg);
|
||||
//! NOTE:
|
||||
//! LANG_ADDON can only be sent by client in "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER"
|
||||
std::string logType = (lang != LANG_ADDON) ? "chat." : "chat.addon.";
|
||||
std::string msgType = "whisper";
|
||||
|
||||
LOG_INFO(logType + msgType, "Player {} {} {}: {}",
|
||||
player->GetName(), msgType, receiver ? receiver->GetName() : "<unknown>", msg);
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
|
||||
|
||||
Reference in New Issue
Block a user