From e407ee135dc511424d12a8d6f935bcc4add1a189 Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Mon, 13 Mar 2023 15:22:13 -0300 Subject: [PATCH] fix(Core/Logs): Fix warden fmt logs (#15327) --- src/server/game/Warden/Warden.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index 7da4a4060..af37fab2b 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -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::StringFormat(reportFormat, plr->GetName().c_str(), plr->GetGUID().GetCounter(), _session->GetAccountId(), - checkId, ((checkData && !checkData->Comment.empty()) ? checkData->Comment.c_str() : ""), - GetWardenActionStr(action).c_str()); + reportMsg = Acore::StringFormatFmt(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(), + checkId, ((checkData && !checkData->Comment.empty()) ? checkData->Comment : ""), + GetWardenActionStr(action)); } else { std::string const reportFormat = "Account id: {} failed warden {} check. Action: {}"; - reportMsg = Acore::StringFormat(reportFormat, _session->GetAccountId(), checkId, GetWardenActionStr(action).c_str()); + reportMsg = Acore::StringFormatFmt(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::StringFormat(reportFormat, plr->GetName().c_str(), plr->GetGUID().GetCounter(), _session->GetAccountId(), causeMsg.c_str(), GetWardenActionStr(action).c_str()); + reportMsg = Acore::StringFormatFmt(reportFormat, plr->GetName(), plr->GetGUID().GetCounter(), _session->GetAccountId(), causeMsg, GetWardenActionStr(action)); } else { std::string const reportFormat = "Account id: {} failed warden {} check. Action: {}"; - reportMsg = Acore::StringFormat(reportFormat, _session->GetAccountId(), causeMsg.c_str(), GetWardenActionStr(action).c_str()); + reportMsg = Acore::StringFormatFmt(reportFormat, _session->GetAccountId(), causeMsg, GetWardenActionStr(action)); } }