refactor(Core/Chat): PSendSysMessage to fmt (#19449)

* refactor(Core/Chat): PSendSysMessage to `fmt`
This commit is contained in:
Kitzunu
2024-07-23 23:48:46 +02:00
committed by GitHub
parent e79c89aeb1
commit 3fbded8f6b
52 changed files with 801 additions and 587 deletions

View File

@@ -31,9 +31,9 @@ void GetPlayerInfo(ChatHandler* handler, Player* player)
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName(),
state, uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons),
lfg::GetRolesString(sLFGMgr->GetRoles(guid)), sLFGMgr->GetComment(guid));
}
using namespace Acore::ChatCommands;
@@ -89,14 +89,14 @@ public:
groupTarget = target->GetGroup();
if (!groupTarget)
{
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName().c_str());
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName());
return true;
}
ObjectGuid guid = groupTarget->GetGUID();
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_GROUP_INFO, groupTarget->isLFGGroup(),
state.c_str(), sLFGMgr->GetDungeon(guid));
state, sLFGMgr->GetDungeon(guid));
for (GroupReference* itr = groupTarget->GetFirstMember(); itr != nullptr; itr = itr->next())
GetPlayerInfo(handler, itr->GetSource());