refactor(Core): rename namespaces and macros to acore (#2454)

This commit is contained in:
Viste
2019-12-01 15:13:31 +03:00
committed by Francesco Borzì
parent e19e95e5d0
commit e22d78ecd6
278 changed files with 1292 additions and 1309 deletions

View File

@@ -243,7 +243,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
// pussywizard: optimization
/*if (sender->HasAura(1852) && type != CHAT_MSG_WHISPER)
{
SendNotification(GetTrinityString(LANG_GM_SILENCE), sender->GetName().c_str());
SendNotification(GetAcoreString(LANG_GM_SILENCE), sender->GetName().c_str());
recvData.rfinish();
return;
}*/
@@ -300,7 +300,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
if (!_player->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
return;
}
@@ -348,7 +348,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ))
{
SendNotification(GetTrinityString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
SendNotification(GetAcoreString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
return;
}
@@ -363,7 +363,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
{
if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
{
SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
return;
}
@@ -392,7 +392,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
// pussywizard: optimization
/*if (GetPlayer()->HasAura(1852) && !receiver->IsGameMaster())
{
SendNotification(GetTrinityString(LANG_GM_SILENCE), GetPlayer()->GetName().c_str());
SendNotification(GetAcoreString(LANG_GM_SILENCE), GetPlayer()->GetName().c_str());
return;
}*/
@@ -552,7 +552,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
{
if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
{
SendNotification(GetTrinityString(LANG_CHANNEL_REQ), sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
SendNotification(GetAcoreString(LANG_CHANNEL_REQ), sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
return;
}
}
@@ -584,7 +584,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
}
else // New AFK mode
{
sender->autoReplyMsg = msg.empty() ? GetTrinityString(LANG_PLAYER_AFK_DEFAULT) : msg;
sender->autoReplyMsg = msg.empty() ? GetAcoreString(LANG_PLAYER_AFK_DEFAULT) : msg;
if (sender->isDND())
sender->ToggleDND();
@@ -611,7 +611,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
}
else // New DND mode
{
sender->autoReplyMsg = msg.empty() ? GetTrinityString(LANG_PLAYER_DND_DEFAULT) : msg;
sender->autoReplyMsg = msg.empty() ? GetAcoreString(LANG_PLAYER_DND_DEFAULT) : msg;
if (sender->isAFK())
sender->ToggleAFK();
@@ -651,7 +651,7 @@ void WorldSession::HandleEmoteOpcode(WorldPacket & recvData)
GetPlayer()->HandleEmoteCommand(emote);
}
namespace Trinity
namespace acore
{
class EmoteChatBuilder
{
@@ -681,7 +681,7 @@ namespace Trinity
uint32 i_emote_num;
Unit const* i_target;
};
} // namespace Trinity
} // namespace acore
void WorldSession::HandleTextEmoteOpcode(WorldPacket & recvData)
{
@@ -693,7 +693,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recvData)
if (!GetPlayer()->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
SendNotification(GetAcoreString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
return;
}
@@ -732,15 +732,15 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recvData)
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
CellCoord p = Trinity::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
CellCoord p = acore::ComputeCellCoord(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
Cell cell(p);
cell.SetNoCreate();
Trinity::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > emote_do(emote_builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), emote_do);
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder> >, WorldTypeMapContainer> message(emote_worker);
acore::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
acore::LocalizedPacketDo<acore::EmoteChatBuilder > emote_do(emote_builder);
acore::PlayerDistWorker<acore::LocalizedPacketDo<acore::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), emote_do);
TypeContainerVisitor<acore::PlayerDistWorker<acore::LocalizedPacketDo<acore::EmoteChatBuilder> >, WorldTypeMapContainer> message(emote_worker);
cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote, 0, unit);