diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-06-05 15:28:11 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-06-05 15:28:11 +0200 |
commit | 7cbbe2c781064c64cfa694852b7c133054ba0373 (patch) | |
tree | 2c81838c73351febf7ab3a1ff5d530fd581da999 /src/server/scripts/Commands | |
parent | b88f4b7f4f8744b7cd455c07d3b94a704c373dfe (diff) |
Core/Chat: Remove fmt::sprintf from headers
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 4 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_titles.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index cd74bb7857e..9217a5c9f4b 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -267,7 +267,7 @@ public: if (*target->m_playerData->PlayerTitle == titleInfo->MaskID) activeStr = handler->GetTrinityString(LANG_ACTIVE); - std::string titleName = fmt::sprintf(name, player->GetName()); + std::string titleName = ChatHandler::PGetParseString(name, player->GetName()); // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 359b9651783..885ccf33f16 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1252,7 +1252,7 @@ public: continue; LocaleConstant locale = handler->GetSessionDbcLocale(); - std::string name = (gender == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[locale]; + std::string_view name = (gender == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)[locale]; if (name.empty()) continue; @@ -1288,7 +1288,7 @@ public: ? handler->GetTrinityString(LANG_ACTIVE) : ""; - std::string titleNameStr = fmt::sprintf(name, targetName); + std::string titleNameStr = ChatHandler::PGetParseString(name, targetName); // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 6d13b7fcaf6..4b79fe12b19 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -80,7 +80,7 @@ public: } std::string tNameLink = handler->GetNameLink(target); - std::string titleNameStr = fmt::sprintf(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); + std::string titleNameStr = ChatHandler::PGetParseString(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); target->SetTitle(titleInfo); target->SetChosenTitle(titleInfo->MaskID); @@ -113,7 +113,7 @@ public: } std::string tNameLink = handler->GetNameLink(target); - std::string titleNameStr = fmt::sprintf(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); + std::string titleNameStr = ChatHandler::PGetParseString(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); target->SetTitle(titleInfo); handler->PSendSysMessage(LANG_TITLE_ADD_RES, *titleId, titleNameStr.c_str(), tNameLink.c_str()); @@ -146,7 +146,7 @@ public: target->SetTitle(titleInfo, true); std::string tNameLink = handler->GetNameLink(target); - std::string titleNameStr = fmt::sprintf(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); + std::string titleNameStr = ChatHandler::PGetParseString(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName()); handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, *titleId, titleNameStr.c_str(), tNameLink.c_str()); |