mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10921] Allow from mute player chat messages CHAT_MSG_AFK and CHAT_MSG_DND.
This commit is contained in:
parent
1b4477164c
commit
246126d7b4
2 changed files with 10 additions and 8 deletions
|
|
@ -146,15 +146,17 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
lang = ModLangAuras.front()->GetModifier()->m_miscvalue;
|
||||
}
|
||||
|
||||
if (!_player->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
|
||||
SendNotification(GetMangosString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (type != CHAT_MSG_AFK && type != CHAT_MSG_DND)
|
||||
{
|
||||
if (!_player->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
|
||||
SendNotification(GetMangosString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
GetPlayer()->UpdateSpeakTime();
|
||||
}
|
||||
}
|
||||
|
||||
switch(type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue