Core/Entities: Make ObjectGuid formattable with fmt without using ToString()
This commit is contained in:
@@ -198,17 +198,13 @@ std::string const & WorldSession::GetPlayerName() const
|
||||
|
||||
std::string WorldSession::GetPlayerInfo() const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
if (_player)
|
||||
return Trinity::StringFormat("[Player: {} {}, Account: {}]", _player->GetName(), _player->GetGUID(), GetAccountId());
|
||||
|
||||
ss << "[Player: ";
|
||||
if (!m_playerLoading.IsEmpty())
|
||||
ss << "Logging in: " << m_playerLoading.ToString() << ", ";
|
||||
else if (_player)
|
||||
ss << _player->GetName() << ' ' << _player->GetGUID().ToString() << ", ";
|
||||
return Trinity::StringFormat("[Player: Logging in: {}, Account: {}]", m_playerLoading, GetAccountId());
|
||||
|
||||
ss << "Account: " << GetAccountId() << "]";
|
||||
|
||||
return ss.str();
|
||||
return Trinity::StringFormat("[Player: Account: {}]", GetAccountId());
|
||||
}
|
||||
|
||||
/// Send a packet to the client
|
||||
|
||||
Reference in New Issue
Block a user