refactor(Core/Misc): Acore::StringFormat to fmt format (#19838)
refactor(Core/Utilities): Acore::StringFormat to fmt format * closes https://github.com/azerothcore/azerothcore-wotlk/issues/10356
This commit is contained in:
@@ -246,14 +246,14 @@ void Warden::ApplyPenalty(uint16 checkId, std::string const& reason)
|
||||
if (Player const* plr = _session->GetPlayer())
|
||||
{
|
||||
std::string const reportFormat = "Player {} (guid {}, account id: {}) failed warden {} check ({}). Action: {}";
|
||||
reportMsg = Acore::StringFormatFmt(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(),
|
||||
reportMsg = Acore::StringFormat(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(),
|
||||
checkId, ((checkData && !checkData->Comment.empty()) ? checkData->Comment : "<warden comment is not set>"),
|
||||
GetWardenActionStr(action));
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const reportFormat = "Account id: {} failed warden {} check. Action: {}";
|
||||
reportMsg = Acore::StringFormatFmt(reportFormat, _session->GetAccountId(), checkId, GetWardenActionStr(action));
|
||||
reportMsg = Acore::StringFormat(reportFormat, _session->GetAccountId(), checkId, GetWardenActionStr(action));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -261,12 +261,12 @@ void Warden::ApplyPenalty(uint16 checkId, std::string const& reason)
|
||||
if (Player const* plr = _session->GetPlayer())
|
||||
{
|
||||
std::string const reportFormat = "Player {} (guid {}, account id: {}) triggered warden penalty by reason: {}. Action: {}";
|
||||
reportMsg = Acore::StringFormatFmt(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(), causeMsg, GetWardenActionStr(action));
|
||||
reportMsg = Acore::StringFormat(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(), causeMsg, GetWardenActionStr(action));
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const reportFormat = "Account id: {} failed warden {} check. Action: {}";
|
||||
reportMsg = Acore::StringFormatFmt(reportFormat, _session->GetAccountId(), causeMsg, GetWardenActionStr(action));
|
||||
reportMsg = Acore::StringFormat(reportFormat, _session->GetAccountId(), causeMsg, GetWardenActionStr(action));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ void WardenCheckMgr::LoadWardenChecks()
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string str2 = Acore::StringFormat("%04u", id);
|
||||
std::string str2 = Acore::StringFormat("{:04}", id);
|
||||
ASSERT(str2.size() == 4);
|
||||
std::copy(str2.begin(), str2.end(), wardenCheck.IdStr.begin());
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ bool WardenPayloadMgr::RegisterPayload(std::string const& payload, uint16 payloa
|
||||
wCheck.Str = payload;
|
||||
wCheck.CheckId = payloadId;
|
||||
|
||||
std::string idStr = Acore::StringFormat("%04u", payloadId);
|
||||
std::string idStr = Acore::StringFormat("{:04}", payloadId);
|
||||
ASSERT(idStr.size() == 4);
|
||||
std::copy(idStr.begin(), idStr.end(), wCheck.IdStr.begin());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user