mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
refactor(Core/WorldSession): Make SendNotification use fmt and parse acore_string (#19489)
* refactor(Core/WorldSession): Make SendNotification use `fmt` * Make SendNotification use `fmt` * Make SendNotification parse acore_string entries
This commit is contained in:
@@ -164,7 +164,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
if (sender->HasAura(1852) && type != CHAT_MSG_WHISPER)
|
||||
{
|
||||
SendNotification(GetAcoreString(LANG_GM_SILENCE), sender->GetName().c_str());
|
||||
SendNotification(LANG_GM_SILENCE, sender->GetName());
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
if (!_player->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - GameTime::GetGameTime().count());
|
||||
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
SendNotification(LANG_WAIT_BEFORE_SPEAKING, timeStr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ))
|
||||
{
|
||||
SendNotification(GetAcoreString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
|
||||
SendNotification(LANG_SAY_REQ, sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && receiver != sender)
|
||||
{
|
||||
SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
||||
SendNotification(LANG_WHISPER_REQ, sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
// pussywizard: optimization
|
||||
if (GetPlayer()->HasAura(1852) && !receiver->IsGameMaster())
|
||||
{
|
||||
SendNotification(GetAcoreString(LANG_GM_SILENCE), GetPlayer()->GetName().c_str());
|
||||
SendNotification(LANG_GM_SILENCE, GetPlayer()->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
|
||||
{
|
||||
SendNotification(GetAcoreString(LANG_CHANNEL_REQ), sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
|
||||
SendNotification(LANG_CHANNEL_REQ, sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -735,7 +735,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket& recvData)
|
||||
if (!GetPlayer()->CanSpeak())
|
||||
{
|
||||
std::string timeStr = secsToTimeString(m_muteTime - GameTime::GetGameTime().count());
|
||||
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
|
||||
SendNotification(LANG_WAIT_BEFORE_SPEAKING, timeStr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user