aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
committerShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
commitd791afae1dfcfaf592326f787755ca32d629e4d3 (patch)
tree54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/scripts
parentb6820a706f46f18b9652fcd9806e4bec8805d29d (diff)
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Battlefield/BattlefieldWG.cpp2
-rw-r--r--src/server/scripts/Commands/cs_account.cpp70
-rw-r--r--src/server/scripts/Commands/cs_ban.cpp8
-rw-r--r--src/server/scripts/Commands/cs_battlenet_account.cpp28
-rw-r--r--src/server/scripts/Commands/cs_character.cpp12
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp6
-rw-r--r--src/server/scripts/Commands/cs_event.cpp12
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp16
-rw-r--r--src/server/scripts/Commands/cs_list.cpp14
-rw-r--r--src/server/scripts/Commands/cs_lookup.cpp5
-rw-r--r--src/server/scripts/Commands/cs_message.cpp2
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp4
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp2
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp2
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp2
-rw-r--r--src/server/scripts/Commands/cs_server.cpp6
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp2
-rw-r--r--src/server/scripts/Commands/cs_titles.cpp6
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp12
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp12
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp4
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp2
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
-rw-r--r--src/server/scripts/World/chat_log.cpp60
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
40 files changed, 174 insertions, 175 deletions
diff --git a/src/server/scripts/Battlefield/BattlefieldWG.cpp b/src/server/scripts/Battlefield/BattlefieldWG.cpp
index 07400151e52..f5ee13db181 100644
--- a/src/server/scripts/Battlefield/BattlefieldWG.cpp
+++ b/src/server/scripts/Battlefield/BattlefieldWG.cpp
@@ -789,7 +789,7 @@ uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
case AREA_THE_CHILLED_QUAGMIRE:
return BATTLEFIELD_WG_GY_HORDE;
default:
- TC_LOG_ERROR("bg.battlefield", "BattlefieldWG::GetSpiritGraveyardId: Unexpected Area Id %u", areaId);
+ TC_LOG_ERROR("bg.battlefield", "BattlefieldWG::GetSpiritGraveyardId: Unexpected Area Id {}", areaId);
break;
}
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 3625a670321..873d777a3e0 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -110,7 +110,7 @@ public:
if (!result)
{
- TC_LOG_ERROR("misc", "Account %u not found in login database when processing .account 2fa setup command.", accountId);
+ TC_LOG_ERROR("misc", "Account {} not found in login database when processing .account 2fa setup command.", accountId);
handler->SendSysMessage(LANG_UNKNOWN_ERROR);
handler->SetSentErrorMessage(true);
return false;
@@ -174,7 +174,7 @@ public:
if (!result)
{
- TC_LOG_ERROR("misc", "Account %u not found in login database when processing .account 2fa setup command.", accountId);
+ TC_LOG_ERROR("misc", "Account {} not found in login database when processing .account 2fa setup command.", accountId);
handler->SendSysMessage(LANG_UNKNOWN_ERROR);
handler->SetSentErrorMessage(true);
return false;
@@ -198,7 +198,7 @@ public:
bool success = Trinity::Crypto::AEDecrypt<Trinity::Crypto::AES>(secret, *masterKey);
if (!success)
{
- TC_LOG_ERROR("misc", "Account %u has invalid ciphertext in TOTP token.", accountId);
+ TC_LOG_ERROR("misc", "Account {} has invalid ciphertext in TOTP token.", accountId);
handler->SendSysMessage(LANG_UNKNOWN_ERROR);
handler->SetSentErrorMessage(true);
return false;
@@ -259,10 +259,10 @@ public:
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName.c_str());
if (handler->GetSession())
{
- TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] %s) created Account %s (Email: '%s')",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- accountName.c_str(), email.value_or("").c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {}) created Account {} (Email: '{}')",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ accountName, email.value_or(""));
}
break;
case AccountOpResult::AOR_NAME_TOO_LONG:
@@ -486,10 +486,10 @@ public:
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Tried to change email, but the provided email [%s] is not equal to registration email [%s].",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- email.c_str(), oldEmail.c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Tried to change email, but the provided email [{}] is not equal to registration email [{}].",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ email, oldEmail);
return false;
}
@@ -498,9 +498,9 @@ public:
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Tried to change email, but the provided password is wrong.",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Tried to change email, but the provided password is wrong.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
return false;
}
@@ -517,9 +517,9 @@ public:
handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH);
sScriptMgr->OnFailedEmailChange(handler->GetSession()->GetAccountId());
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Tried to change email, but the confirm email does not match.",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Tried to change email, but the confirm email does not match.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
return false;
}
@@ -529,10 +529,10 @@ public:
case AccountOpResult::AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
sScriptMgr->OnEmailChange(handler->GetSession()->GetAccountId());
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Changed Email from [%s] to [%s].",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- oldEmail.c_str(), email.c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Changed Email from [{}] to [{}].",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ oldEmail, email);
break;
case AccountOpResult::AOR_EMAIL_TOO_LONG:
handler->SendSysMessage(LANG_EMAIL_TOO_LONG);
@@ -559,9 +559,9 @@ public:
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId());
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Tried to change password, but the provided old password is wrong.",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Tried to change password, but the provided old password is wrong.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
return false;
}
@@ -572,10 +572,10 @@ public:
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
sScriptMgr->OnFailedPasswordChange(handler->GetSession()->GetAccountId());
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s Tried to change password, but the entered email [%s] is wrong.",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- confirmEmail.value_or("").c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} Tried to change password, but the entered email [{}] is wrong.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ confirmEmail.value_or(""));
return false;
}
@@ -595,9 +595,9 @@ public:
case AccountOpResult::AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
sScriptMgr->OnPasswordChange(handler->GetSession()->GetAccountId());
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] %s changed password.",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] {} changed password.",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
break;
case AccountOpResult::AOR_PASS_TOO_LONG:
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
@@ -944,8 +944,8 @@ public:
{
case AccountOpResult::AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
- TC_LOG_INFO("entities.player.character", "ChangeEmail: Account %s [Id: %u] had it's email changed to %s.",
- accountName.c_str(), targetAccountId, email.c_str());
+ TC_LOG_INFO("entities.player.character", "ChangeEmail: Account {} [Id: {}] had it's email changed to {}.",
+ accountName, targetAccountId, email);
break;
case AccountOpResult::AOR_NAME_NOT_EXIST:
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
@@ -999,8 +999,8 @@ public:
{
case AccountOpResult::AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
- TC_LOG_INFO("entities.player.character", "ChangeRegEmail: Account %s [Id: %u] had it's Registration Email changed to %s.",
- accountName.c_str(), targetAccountId, email.c_str());
+ TC_LOG_INFO("entities.player.character", "ChangeRegEmail: Account {} [Id: {}] had it's Registration Email changed to {}.",
+ accountName, targetAccountId, email);
break;
case AccountOpResult::AOR_NAME_NOT_EXIST:
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp
index 053c3fc9933..5e717b379db 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -278,7 +278,7 @@ public:
static bool HandleBanInfoHelper(uint32 accountId, char const* accountName, ChatHandler* handler)
{
- QueryResult result = LoginDatabase.PQuery("SELECT FROM_UNIXTIME(bandate), unbandate-bandate, active, unbandate, banreason, bannedby FROM account_banned WHERE id = '%u' ORDER BY bandate ASC", accountId);
+ QueryResult result = LoginDatabase.PQuery("SELECT FROM_UNIXTIME(bandate), unbandate-bandate, active, unbandate, banreason, bannedby FROM account_banned WHERE id = '{}' ORDER BY bandate ASC", accountId);
if (!result)
{
handler->PSendSysMessage(LANG_BANINFO_NOACCOUNTBAN, accountName);
@@ -375,7 +375,7 @@ public:
std::string IP = ipStr;
LoginDatabase.EscapeString(IP);
- QueryResult result = LoginDatabase.PQuery("SELECT ip, FROM_UNIXTIME(bandate), FROM_UNIXTIME(unbandate), unbandate-UNIX_TIMESTAMP(), banreason, bannedby, unbandate-bandate FROM ip_banned WHERE ip = '%s'", IP.c_str());
+ QueryResult result = LoginDatabase.PQuery("SELECT ip, FROM_UNIXTIME(bandate), FROM_UNIXTIME(unbandate), unbandate-UNIX_TIMESTAMP(), banreason, bannedby, unbandate-bandate FROM ip_banned WHERE ip = '{}'", IP);
if (!result)
{
handler->PSendSysMessage(LANG_BANINFO_NOIP);
@@ -436,7 +436,7 @@ public:
Field* fields = result->Fetch();
uint32 accountid = fields[0].GetUInt32();
- QueryResult banResult = LoginDatabase.PQuery("SELECT account.username FROM account, account_banned WHERE account_banned.id='%u' AND account_banned.id = account.id", accountid);
+ QueryResult banResult = LoginDatabase.PQuery("SELECT account.username FROM account, account_banned WHERE account_banned.id='{}' AND account_banned.id = account.id", accountid);
if (banResult)
{
Field* fields2 = banResult->Fetch();
@@ -467,7 +467,7 @@ public:
AccountMgr::GetName(accountId, accountName);
// No SQL injection. id is uint32.
- QueryResult banInfo = LoginDatabase.PQuery("SELECT bandate, unbandate, bannedby, banreason FROM account_banned WHERE id = %u ORDER BY unbandate", accountId);
+ QueryResult banInfo = LoginDatabase.PQuery("SELECT bandate, unbandate, bannedby, banreason FROM account_banned WHERE id = {} ORDER BY unbandate", accountId);
if (banInfo)
{
Field* fields2 = banInfo->Fetch();
diff --git a/src/server/scripts/Commands/cs_battlenet_account.cpp b/src/server/scripts/Commands/cs_battlenet_account.cpp
index b7285cf5897..78c4860ae3b 100644
--- a/src/server/scripts/Commands/cs_battlenet_account.cpp
+++ b/src/server/scripts/Commands/cs_battlenet_account.cpp
@@ -89,10 +89,10 @@ public:
if (handler->GetSession())
{
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) created Battle.net account %s%s%s",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- accountName.c_str(), createGameAccount != false ? " with game account " : "", createGameAccount != false ? gameAccountName.c_str() : "");
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] ({}) created Battle.net account {}{}{}",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ accountName, createGameAccount != false ? " with game account " : "", createGameAccount != false ? gameAccountName.c_str() : "");
}
break;
}
@@ -174,9 +174,9 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (%s) Tried to change password, but the provided old password is wrong.",
- handler->GetSession()->GetBattlenetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Battle.net account: {} (IP: {}) Character:[{}] ({}) Tried to change password, but the provided old password is wrong.",
+ handler->GetSession()->GetBattlenetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
return false;
}
@@ -194,9 +194,9 @@ public:
{
case AccountOpResult::AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
- TC_LOG_INFO("entities.player.character", "Battle.net account: %u (IP: %s) Character:[%s] (%s) Changed Password.",
- handler->GetSession()->GetBattlenetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str());
+ TC_LOG_INFO("entities.player.character", "Battle.net account: {} (IP: {}) Character:[{}] ({}) Changed Password.",
+ handler->GetSession()->GetBattlenetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString());
break;
case AccountOpResult::AOR_PASS_TOO_LONG:
handler->SendSysMessage(LANG_PASSWORD_TOO_LONG);
@@ -322,10 +322,10 @@ public:
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName.c_str());
if (handler->GetSession())
{
- TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (%s) created Account %s (Email: '%s')",
- handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
- handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUID().ToString().c_str(),
- accountName.c_str(), bnetAccountName.c_str());
+ TC_LOG_INFO("entities.player.character", "Account: {} (IP: {}) Character:[{}] ({}) created Account {} (Email: '{}')",
+ handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress(),
+ handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUID().ToString(),
+ accountName, bnetAccountName);
}
break;
case AccountOpResult::AOR_NAME_TOO_LONG:
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index ea4666a0da7..9363b146573 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 = Trinity::StringFormat(name, player->GetName().c_str());
+ std::string titleName = fmt::sprintf(name, player->GetName());
// send title in "id (idx:idx) - [namedlink locale]" format
if (handler->GetSession())
@@ -358,10 +358,10 @@ public:
if (WorldSession* session = handler->GetSession())
{
if (Player* player = session->GetPlayer())
- sLog->OutCommand(session->GetAccountId(), "GM %s (Account: %u) forced rename %s to player %s (Account: %u)", player->GetName().c_str(), session->GetAccountId(), newName.c_str(), player->GetName().c_str(), sCharacterCache->GetCharacterAccountIdByGuid(player->GetGUID()));
+ sLog->OutCommand(session->GetAccountId(), "GM {} (Account: {}) forced rename {} to player {} (Account: {})", player->GetName(), session->GetAccountId(), newName, player->GetName(), sCharacterCache->GetCharacterAccountIdByGuid(player->GetGUID()));
}
else
- sLog->OutCommand(0, "CONSOLE forced rename '%s' to '%s' (%s)", player->GetName().c_str(), newName.c_str(), player->GetGUID().ToString().c_str());
+ sLog->OutCommand(0, "CONSOLE forced rename '{}' to '{}' ({})", player->GetName(), newName, player->GetGUID().ToString());
}
else
{
@@ -506,14 +506,14 @@ public:
handler->PSendSysMessage(LANG_CHANGEACCOUNT_SUCCESS, player->GetName().c_str(), newAccount.GetName().c_str());
- std::string logString = Trinity::StringFormat("changed ownership of player %s (%s) from account %u to account %u", player->GetName().c_str(), player->GetGUID().ToString().c_str(), oldAccountId, newAccount.GetID());
+ std::string logString = Trinity::StringFormat("changed ownership of player {} ({}) from account {} to account {}", player->GetName(), player->GetGUID().ToString(), oldAccountId, newAccount.GetID());
if (WorldSession* session = handler->GetSession())
{
if (Player* player = session->GetPlayer())
- sLog->OutCommand(session->GetAccountId(), "GM %s (Account: %u) %s", player->GetName().c_str(), session->GetAccountId(), logString.c_str());
+ sLog->OutCommand(session->GetAccountId(), "GM {} (Account: {}) {}", player->GetName(), session->GetAccountId(), logString);
}
else
- sLog->OutCommand(0, "%s %s", handler->GetTrinityString(LANG_CONSOLE), logString.c_str());
+ sLog->OutCommand(0, "{} {}", handler->GetTrinityString(LANG_CONSOLE), logString);
return true;
}
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 26e2baa9c81..682a3f5048c 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -484,11 +484,11 @@ public:
}
else
{
- TC_LOG_ERROR("misc", "Sending opcode that has unknown type '%s'", type.c_str());
+ TC_LOG_ERROR("misc", "Sending opcode that has unknown type '{}'", type);
break;
}
}
- TC_LOG_DEBUG("network", "Sending opcode %u", data.GetOpcode());
+ TC_LOG_DEBUG("network", "Sending opcode {}", data.GetOpcode());
data.hexlike();
player->GetSession()->SendPacket(&data, true);
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName().c_str());
@@ -1205,7 +1205,7 @@ public:
{
Player* player = handler->GetPlayer();
- TC_LOG_INFO("sql.dev", "(@PATH, XX, %.3f, %.3f, %.5f, %.5f, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
+ TC_LOG_INFO("sql.dev", "(@PATH, XX, {:.3f}, {:.3f}, {:.5f}, {:.5f}, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
return true;
diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp
index 0f956dccfb2..0a685bc69ec 100644
--- a/src/server/scripts/Commands/cs_event.cpp
+++ b/src/server/scripts/Commands/cs_event.cpp
@@ -81,7 +81,7 @@ public:
return true;
}
- static bool HandleEventInfoCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> const eventId)
+ static bool HandleEventInfoCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> eventId)
{
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
@@ -92,7 +92,7 @@ public:
return false;
}
- GameEventData const& eventData = events[eventId];
+ GameEventData const& eventData = events[*eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
@@ -120,7 +120,7 @@ public:
return true;
}
- static bool HandleEventStartCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> const eventId)
+ static bool HandleEventStartCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> eventId)
{
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
@@ -131,7 +131,7 @@ public:
return false;
}
- GameEventData const& eventData = events[eventId];
+ GameEventData const& eventData = events[*eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
@@ -151,7 +151,7 @@ public:
return true;
}
- static bool HandleEventStopCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> const eventId)
+ static bool HandleEventStopCommand(ChatHandler* handler, Variant<Hyperlink<gameevent>, uint16> eventId)
{
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
@@ -162,7 +162,7 @@ public:
return false;
}
- GameEventData const& eventData = events[eventId];
+ GameEventData const& eventData = events[*eventId];
if (!eventData.isValid())
{
handler->SendSysMessage(LANG_EVENT_NOT_EXIST);
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index 2f84c6e9f77..5d051d513fe 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -121,7 +121,7 @@ public:
if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId))
{
// report to DB errors log as in loading case
- TC_LOG_ERROR("sql.sql", "Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", *objectId, objectInfo->type, objectInfo->displayId);
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry {} GoType: {}) have invalid displayId ({}), not spawned.", *objectId, objectInfo->type, objectInfo->displayId);
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, objectId);
handler->SetSentErrorMessage(true);
return false;
@@ -187,7 +187,7 @@ public:
{
if (objectId->holds_alternative<GameObjectEntry>())
{
- result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, PhaseId, PhaseGroup, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE map = '%i' AND id = '%u' ORDER BY order_ ASC LIMIT 1",
+ result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, orientation, map, PhaseId, PhaseGroup, (POW(position_x - '{}', 2) + POW(position_y - '{}', 2) + POW(position_z - '{}', 2)) AS order_ FROM gameobject WHERE map = '{}' AND id = '{}' ORDER BY order_ ASC LIMIT 1",
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), static_cast<uint32>(objectId->get<GameObjectEntry>()));
}
else
@@ -195,9 +195,9 @@ public:
std::string name = std::string(objectId->get<std::string_view>());
WorldDatabase.EscapeString(name);
result = WorldDatabase.PQuery(
- "SELECT guid, id, position_x, position_y, position_z, orientation, map, PhaseId, PhaseGroup, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
- "FROM gameobject LEFT JOIN gameobject_template ON gameobject_template.entry = gameobject.id WHERE map = %i AND name LIKE '%%%s%%' ORDER BY order_ ASC LIMIT 1",
- player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name.c_str());
+ "SELECT guid, id, position_x, position_y, position_z, orientation, map, PhaseId, PhaseGroup, (POW(position_x - {}, 2) + POW(position_y - {}, 2) + POW(position_z - {}, 2)) AS order_ "
+ "FROM gameobject LEFT JOIN gameobject_template ON gameobject_template.entry = gameobject.id WHERE map = {} AND name LIKE '%{}%' ORDER BY order_ ASC LIMIT 1",
+ player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name);
}
}
else
@@ -223,10 +223,10 @@ public:
eventFilter << ')';
result = WorldDatabase.PQuery("SELECT gameobject.guid, id, position_x, position_y, position_z, orientation, map, PhaseId, PhaseGroup, "
- "(POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ FROM gameobject "
- "LEFT OUTER JOIN game_event_gameobject on gameobject.guid = game_event_gameobject.guid WHERE map = '%i' %s ORDER BY order_ ASC LIMIT 10",
+ "(POW(position_x - {}, 2) + POW(position_y - {}, 2) + POW(position_z - {}, 2)) AS order_ FROM gameobject "
+ "LEFT OUTER JOIN game_event_gameobject on gameobject.guid = game_event_gameobject.guid WHERE map = '{}' {} ORDER BY order_ ASC LIMIT 10",
handler->GetSession()->GetPlayer()->GetPositionX(), handler->GetSession()->GetPlayer()->GetPositionY(), handler->GetSession()->GetPlayer()->GetPositionZ(),
- handler->GetSession()->GetPlayer()->GetMapId(), eventFilter.str().c_str());
+ handler->GetSession()->GetPlayer()->GetMapId(), eventFilter.str());
}
if (!result)
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index 5ca3df7caca..7f456fdef22 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -93,18 +93,18 @@ public:
QueryResult result;
uint32 creatureCount = 0;
- result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM creature WHERE id='%u'", creatureId);
+ result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM creature WHERE id='{}'", creatureId);
if (result)
creatureCount = (*result)[0].GetUInt64();
if (handler->GetSession())
{
Player* player = handler->GetSession()->GetPlayer();
- result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM creature WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
+ result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, (POW(position_x - '{}', 2) + POW(position_y - '{}', 2) + POW(position_z - '{}', 2)) AS order_ FROM creature WHERE id = '{}' ORDER BY order_ ASC LIMIT {}",
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), creatureId, count);
}
else
- result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '%u' LIMIT %u",
+ result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map FROM creature WHERE id = '{}' LIMIT {}",
creatureId, count);
if (result)
@@ -363,18 +363,18 @@ public:
QueryResult result;
uint32 objectCount = 0;
- result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM gameobject WHERE id='%u'", gameObjectId);
+ result = WorldDatabase.PQuery("SELECT COUNT(guid) FROM gameobject WHERE id='{}'", gameObjectId);
if (result)
objectCount = (*result)[0].GetUInt64();
if (handler->GetSession())
{
Player* player = handler->GetSession()->GetPlayer();
- result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id, (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ FROM gameobject WHERE id = '%u' ORDER BY order_ ASC LIMIT %u",
+ result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id, (POW(position_x - '{}', 2) + POW(position_y - '{}', 2) + POW(position_z - '{}', 2)) AS order_ FROM gameobject WHERE id = '{}' ORDER BY order_ ASC LIMIT {}",
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), gameObjectId, count);
}
else
- result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id FROM gameobject WHERE id = '%u' LIMIT %u",
+ result = WorldDatabase.PQuery("SELECT guid, position_x, position_y, position_z, map, id FROM gameobject WHERE id = '{}' LIMIT {}",
gameObjectId, count);
if (result)
@@ -564,7 +564,7 @@ public:
if (hasItem == 1)
{
QueryResult result2;
- result2 = CharacterDatabase.PQuery("SELECT item_guid FROM mail_items WHERE mail_id = '%u'", messageId);
+ result2 = CharacterDatabase.PQuery("SELECT item_guid FROM mail_items WHERE mail_id = '{}'", messageId);
if (result2)
{
do
diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp
index 097e98fd90e..cfd9b4fd99a 100644
--- a/src/server/scripts/Commands/cs_lookup.cpp
+++ b/src/server/scripts/Commands/cs_lookup.cpp
@@ -904,8 +904,7 @@ public:
uint32 permValue = target->GetSkillPermBonusValue(id);
uint32 tempValue = target->GetSkillTempBonusValue(id);
- char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES);
- valStr = Trinity::StringFormat(valFormat, curValue, maxValue, permValue, tempValue);
+ valStr = handler->PGetParseString(LANG_SKILL_VALUES, curValue, maxValue, permValue, tempValue);
}
// send skill in "id - [namedlink locale]" format
@@ -1289,7 +1288,7 @@ public:
? handler->GetTrinityString(LANG_ACTIVE)
: "";
- std::string titleNameStr = Trinity::StringFormat(name.c_str(), targetName);
+ std::string titleNameStr = fmt::sprintf(name, targetName);
// send title in "id (idx:idx) - [namedlink locale]" format
if (handler->GetSession())
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp
index df2b4243643..67b141ac2dd 100644
--- a/src/server/scripts/Commands/cs_message.cpp
+++ b/src/server/scripts/Commands/cs_message.cpp
@@ -155,7 +155,7 @@ public:
if (message.empty())
return false;
- sWorld->SendServerMessage(SERVER_MSG_STRING, Trinity::StringFormat(handler->GetTrinityString(LANG_SYSTEMMESSAGE), message.data()).c_str());
+ sWorld->SendServerMessage(SERVER_MSG_STRING, handler->PGetParseString(LANG_SYSTEMMESSAGE, message.data()));
return true;
}
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index dce7d2cb339..c21c559db55 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -587,7 +587,7 @@ public:
{
int64 newmoney = int64(targetMoney) + moneyToAdd;
- TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_MONEY), std::to_string(targetMoney).c_str(), std::to_string(moneyToAdd).c_str(), std::to_string(newmoney).c_str());
+ TC_LOG_DEBUG("misc", "{}", handler->PGetParseString(LANG_CURRENT_MONEY, std::to_string(targetMoney), std::to_string(moneyToAdd), std::to_string(newmoney)));
if (newmoney <= 0)
{
NotifyModification(handler, target, LANG_YOU_TAKE_ALL_MONEY, LANG_YOURS_ALL_MONEY_GONE);
@@ -619,7 +619,7 @@ public:
target->ModifyMoney(moneyToAdd);
}
- TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_NEW_MONEY), std::to_string(targetMoney).c_str(), std::to_string(moneyToAdd).c_str(), std::to_string(target->GetMoney()).c_str());
+ TC_LOG_DEBUG("misc", "{}", handler->PGetParseString(LANG_NEW_MONEY, std::to_string(targetMoney), std::to_string(moneyToAdd), std::to_string(target->GetMoney())));
return true;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 5d0c0113a42..8e5c5978af9 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -1181,7 +1181,7 @@ public:
if (!pair.second)
continue;
Player const* player = ObjectAccessor::FindConnectedPlayer(pair.first);
- handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_SUBLABEL, player ? player->GetName().c_str() : Trinity::StringFormat("Offline player (GUID %s)", pair.first.ToString().c_str()).c_str(), pair.second->size());
+ handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_SUBLABEL, player ? player->GetName() : Trinity::StringFormat("Offline player (GUID {})", pair.first.ToString()), pair.second->size());
for (auto it = pair.second->cbegin(); it != pair.second->cend(); ++it)
{
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index eac2eb77640..11bd53fd0b4 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -451,7 +451,7 @@ public:
continue;
}
- TC_LOG_INFO("misc", "Reloading creature template entry %u", entry);
+ TC_LOG_INFO("misc", "Reloading creature template entry {}", entry);
Field* fields = result->Fetch();
sObjectMgr->LoadCreatureTemplate(fields);
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 139f25b5226..56c5f8b0ef8 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -97,7 +97,7 @@ public:
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->GetClass());
if (!classEntry)
{
- TC_LOG_ERROR("misc", "Class %u not found in DBC (Wrong DBC files?)", player->GetClass());
+ TC_LOG_ERROR("misc", "Class {} not found in DBC (Wrong DBC files?)", player->GetClass());
return false;
}
diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp
index 7306b73554c..8aa006c35de 100644
--- a/src/server/scripts/Commands/cs_server.cpp
+++ b/src/server/scripts/Commands/cs_server.cpp
@@ -126,13 +126,13 @@ public:
{
uint16 dbPort = 0;
- if (QueryResult res = LoginDatabase.PQuery("SELECT port FROM realmlist WHERE id = %u", realm.Id.Realm))
+ if (QueryResult res = LoginDatabase.PQuery("SELECT port FROM realmlist WHERE id = {}", realm.Id.Realm))
dbPort = (*res)[0].GetUInt16();
if (dbPort)
- dbPortOutput = Trinity::StringFormat("Realmlist (Realm Id: %u) configured in port %" PRIu16, realm.Id.Realm, dbPort);
+ dbPortOutput = Trinity::StringFormat("Realmlist (Realm Id: {}) configured in port %" PRIu16, realm.Id.Realm, dbPort);
else
- dbPortOutput = Trinity::StringFormat("Realm Id: %u not found in `realmlist` table. Please check your setup", realm.Id.Realm);
+ dbPortOutput = Trinity::StringFormat("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
}
handler->PSendSysMessage("%s", GitRevision::GetFullVersion());
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index b538507732e..0e1b2178bac 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -368,7 +368,7 @@ public:
std::string normalizedName(name);
WorldDatabase.EscapeString(normalizedName);
- QueryResult result = WorldDatabase.PQuery("SELECT c.position_x, c.position_y, c.position_z, c.orientation, c.map, ct.name FROM creature c INNER JOIN creature_template ct ON c.id = ct.entry WHERE ct.name LIKE '%s'", normalizedName.c_str());
+ QueryResult result = WorldDatabase.PQuery("SELECT c.position_x, c.position_y, c.position_z, c.orientation, c.map, ct.name FROM creature c INNER JOIN creature_template ct ON c.id = ct.entry WHERE ct.name LIKE '{}'", normalizedName);
if (!result)
{
handler->SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND);
diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp
index a6318292538..918535e4da2 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 = Trinity::StringFormat(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName());
+ std::string titleNameStr = fmt::sprintf(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 = Trinity::StringFormat(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName());
+ std::string titleNameStr = fmt::sprintf(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 = Trinity::StringFormat(target->GetNativeGender() == GENDER_MALE ? titleInfo->Name[handler->GetSessionDbcLocale()] : titleInfo->Name1[handler->GetSessionDbcLocale()], target->GetName());
+ std::string titleNameStr = fmt::sprintf(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());
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index 988cd25c92b..d70d97746fc 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -530,7 +530,7 @@ public:
}
else if (arg_str_2 == "dataint")
{
- WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%u' WHERE guid='%u'", arg_2, atoul(arg_3), id); // Query can't be a prepared statement
+ WorldDatabase.PExecute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, atoul(arg_3), id); // Query can't be a prepared statement
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 dataint updated.|r", id);
return true;
@@ -539,7 +539,7 @@ public:
{
std::string arg_str_3 = arg_3;
WorldDatabase.EscapeString(arg_str_3);
- WorldDatabase.PExecute("UPDATE waypoint_scripts SET %s='%s' WHERE guid='%u'", arg_2, arg_str_3.c_str(), id); // Query can't be a prepared statement
+ WorldDatabase.PExecute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, arg_str_3, id); // Query can't be a prepared statement
}
}
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
@@ -724,14 +724,14 @@ public:
if (text == nullptr)
{
// show_str check for present in list of correct values, no sql injection possible
- WorldDatabase.PExecute("UPDATE waypoint_data SET %s=NULL WHERE id='%u' AND point='%u'", show_str, pathid, point); // Query can't be a prepared statement
+ WorldDatabase.PExecute("UPDATE waypoint_data SET {}=NULL WHERE id='{}' AND point='{}'", show_str, pathid, point); // Query can't be a prepared statement
}
else
{
// show_str check for present in list of correct values, no sql injection possible
std::string text2 = text;
WorldDatabase.EscapeString(text2);
- WorldDatabase.PExecute("UPDATE waypoint_data SET %s='%s' WHERE id='%u' AND point='%u'", show_str, text2.c_str(), pathid, point); // Query can't be a prepared statement
+ WorldDatabase.PExecute("UPDATE waypoint_data SET {}='{}' WHERE id='{}' AND point='{}'", show_str, text2, pathid, point); // Query can't be a prepared statement
}
handler->PSendSysMessage(LANG_WAYPOINT_CHANGED_NO, show_str);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index 61f938dfd2c..38089a22e85 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -185,7 +185,7 @@ public:
void SetGuidData(uint32 type, ObjectGuid data) override
{
- TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetGuidData update (Type: %u Data %s)", type, data.ToString().c_str());
+ TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetGuidData update (Type: {} Data {})", type, data.ToString());
switch (type)
{
@@ -201,7 +201,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
- TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetData update (Type: {} Data {})", type, data);
switch (type)
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index b33b267ff30..06668bbed4f 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -246,7 +246,7 @@ public:
void PrepareEncounter()
{
- TC_LOG_DEBUG("scripts", "Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
+ TC_LOG_DEBUG("scripts", "Barnes Opera Event - Introduction complete - preparing encounter {}", m_uiEventId);
uint8 index = 0;
uint8 count = 0;
@@ -352,17 +352,17 @@ public:
case GOSSIP_ACTION_INFO_DEF + 3:
CloseGossipMenuFor(player);
m_uiEventId = EVENT_OZ;
- TC_LOG_DEBUG("scripts", "player (%s) manually set Opera event to EVENT_OZ", player->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("scripts", "player ({}) manually set Opera event to EVENT_OZ", player->GetGUID().ToString());
break;
case GOSSIP_ACTION_INFO_DEF + 4:
CloseGossipMenuFor(player);
m_uiEventId = EVENT_HOOD;
- TC_LOG_DEBUG("scripts", "player (%s) manually set Opera event to EVENT_HOOD", player->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("scripts", "player ({}) manually set Opera event to EVENT_HOOD", player->GetGUID().ToString());
break;
case GOSSIP_ACTION_INFO_DEF + 5:
CloseGossipMenuFor(player);
m_uiEventId = EVENT_RAJ;
- TC_LOG_DEBUG("scripts", "player (%s) manually set Opera event to EVENT_RAJ", player->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("scripts", "player ({}) manually set Opera event to EVENT_RAJ", player->GetGUID().ToString());
break;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 5ed12df38f0..ac65e640ade 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -224,7 +224,7 @@ public:
else
{
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
- //TC_LOG_DEBUG("scripts", "npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
+ //TC_LOG_DEBUG("scripts", "npc_unworthy_initiateAI: move to {} {} {}", anchorX, anchorY, me->GetPositionZ());
phase = PHASE_EQUIPING;
wait_timer = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index ac6891a3ff7..7529ae15ce2 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -357,7 +357,7 @@ class instance_stratholme : public InstanceMapScript
TC_LOG_DEBUG("scripts", "Instance Stratholme: Ramstein spawned.");
}
else
- TC_LOG_DEBUG("scripts", "Instance Stratholme: %u Abomnation left to kill.", count);
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: {} Abomnation left to kill.", count);
}
if (data == NOT_STARTED)
@@ -458,7 +458,7 @@ class instance_stratholme : public InstanceMapScript
case EVENT_BARON_RUN:
if (GetData(TYPE_BARON_RUN) != DONE)
SetData(TYPE_BARON_RUN, FAIL);
- TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN));
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run event reached end. Event has state {}.", GetData(TYPE_BARON_RUN));
break;
case EVENT_SLAUGHTER_SQUARE:
if (Creature* baron = instance->GetCreature(baronGUID))
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index 05eb00e7f5b..fc3036fd941 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -181,7 +181,7 @@ public:
break;
}
- TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event {} (Data={})", type, data);
}
bool SetBossState(uint32 id, EncounterState state) override
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 3638983b30c..1ca9817b337 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -384,12 +384,12 @@ class npc_chromie_start : public CreatureScript
for (uint32 state = 1; state <= COMPLETE; state = state << 1)
{
if (GetStableStateFor(COSProgressStates(state)) == state)
- AddGossipItemFor(player, GossipOptionNpc::None, Trinity::StringFormat("Set instance progress to 0x%05X", state), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + AsUnderlyingType(GOSSIP_OFFSET_GM_INITIAL) + state);
+ AddGossipItemFor(player, GossipOptionNpc::None, Trinity::StringFormat("Set instance progress to 0x{:05X}", state), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + AsUnderlyingType(GOSSIP_OFFSET_GM_INITIAL) + state);
}
for (uint32 state = 1; state <= COMPLETE; state = state << 1)
{
if (GetStableStateFor(COSProgressStates(state)) != state)
- AddGossipItemFor(player, GossipOptionNpc::None, Trinity::StringFormat("Force state to 0x%05X (UNSTABLE)", state), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + AsUnderlyingType(GOSSIP_OFFSET_GM_INITIAL) + state);
+ AddGossipItemFor(player, GossipOptionNpc::None, Trinity::StringFormat("Force state to 0x{:05X} (UNSTABLE)", state), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + AsUnderlyingType(GOSSIP_OFFSET_GM_INITIAL) + state);
}
SendGossipMenuFor(player, GOSSIP_TEXT_SKIP_1, me->GetGUID());
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
index b85cb34814e..87a89e0d80c 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
@@ -300,7 +300,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
if (!_infiniteGuardianTimeout)
timediff = -1;
- TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::ReadSaveDataMore: Loaded with state %u and guardian timeout at %zu minutes %zu seconds from now", (uint32)loadState, timediff / MINUTE, timediff % MINUTE);
+ TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::ReadSaveDataMore: Loaded with state {} and guardian timeout at {} minutes {} seconds from now", (uint32)loadState, timediff / MINUTE, timediff % MINUTE);
}
void SetData(uint32 type, uint32 data) override
@@ -605,7 +605,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
_plagueCrates.push_back(creature->GetGUID());
break;
case NPC_ARTHAS:
- TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::OnCreatureCreate: Arthas spawned at %s", creature->GetPosition().ToString().c_str());
+ TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::OnCreatureCreate: Arthas spawned at {}", creature->GetPosition().ToString());
_arthasGUID = creature->GetGUID();
creature->setActive(true);
break;
@@ -643,7 +643,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
void SetInstanceProgress(COSProgressStates state, bool force)
{
- TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::SetInstanceProgress: Instance progress is now 0x%X", (uint32)state);
+ TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::SetInstanceProgress: Instance progress is now 0x{:X}", (uint32)state);
_currentState = state;
/* Spawn group management */
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp
index 9f9693ef4a5..82ce28abb91 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp
@@ -556,10 +556,10 @@ public:
void AdvanceToState(COSProgressStates newState)
{
- TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to 0x%X", newState);
+ TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to 0x{:X}", newState);
if (!_progressRP)
{
- TC_LOG_WARN("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to instance state 0x%X, but RP is paused. Overriding!", newState);
+ TC_LOG_WARN("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: advancing to instance state 0x{:X}, but RP is paused. Overriding!", newState);
_progressRP = true;
}
@@ -581,7 +581,7 @@ public:
else
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
- TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: has snapback for this state, distance = %f", target.SnapbackPosition->GetExactDist(me));
+ TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::AdvanceToState: has snapback for this state, distance = {}", target.SnapbackPosition->GetExactDist(me));
// Snapback handling - if we're too far from where we're supposed to be, teleport there
if (target.SnapbackPosition->GetExactDist(me) > ArthasSnapbackDistanceThreshold)
me->NearTeleportTo(*target.SnapbackPosition);
@@ -1534,7 +1534,7 @@ public:
void JustEngagedWith(Unit* who) override
{
- TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustEngagedWith: RP in progress? '%s'", _progressRP ? "YES" : "NO");
+ TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::JustEngagedWith: RP in progress? '{}'", _progressRP ? "YES" : "NO");
if (_progressRP)
{
_progressRP = false;
@@ -1551,7 +1551,7 @@ public:
void EnterEvadeMode(EvadeReason why) override
{
- TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::EnterEvadeMode: why = %u ", why);
+ TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::EnterEvadeMode: why = {} ", why);
ScriptedAI::EnterEvadeMode(why);
}
@@ -1601,7 +1601,7 @@ public:
bool OnGossipSelect(Player* player, uint32 /*sender*/, uint32 listId) override
{
uint32 const action = GetGossipActionFor(player, listId);
- TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::GossipSelect: '%s' selects action '%u' on '%s'", player->GetGUID().ToString().c_str(), action, me->GetGUID().ToString().c_str());
+ TC_LOG_TRACE("scripts.cos", "npc_arthas_stratholmeAI::GossipSelect: '{}' selects action '{}' on '{}'", player->GetGUID().ToString(), action, me->GetGUID().ToString());
AdvanceDungeon(player, PURGE_PENDING, DATA_START_PURGE);
AdvanceDungeon(player, TOWN_HALL_PENDING, DATA_START_TOWN_HALL);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
index bcebfcaa72f..6b68b014ed4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -116,7 +116,7 @@ public:
++mBarrelCount;
DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount);
- TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: go_barrel_old_hillsbrad count {}", mBarrelCount);
if (mBarrelCount == 5)
{
@@ -143,7 +143,7 @@ public:
else
ThrallEscortState = OH_ESCORT_PRISON_TO_SKARLOC; // not correct, see npc_thrall_old_hillsbrad::InitializeAI for details
}
- TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall escort event adjusted to data {}.", data);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
index 0e04032c014..5e489251b8c 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
@@ -250,7 +250,7 @@ public:
if (entry == RIFT_BOSS)
entry = RandRiftBoss();
- TC_LOG_DEBUG("scripts", "Instance The Black Morass: Summoning rift boss entry %u.", entry);
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Summoning rift boss entry {}.", entry);
Position pos = me->GetRandomNearPosition(10.0f);
@@ -273,7 +273,7 @@ public:
if (tmp >= _currentRiftId)
++tmp;
- TC_LOG_DEBUG("scripts", "Instance The Black Morass: Creating Time Rift at locationId %i (old locationId was %u).", tmp, _currentRiftId);
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Creating Time Rift at locationId {} (old locationId was {}).", tmp, _currentRiftId);
_currentRiftId = tmp;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
index af7c81370e4..5e066c954ee 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
@@ -345,7 +345,7 @@ struct npc_time_rift : public ScriptedAI
uint32 entry = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
- TC_LOG_DEBUG("scripts", "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
+ TC_LOG_DEBUG("scripts", "npc_time_rift: summoning wave Creature (Wave {}, Entry {}).", mRiftWaveCount, entry);
++mRiftWaveCount;
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index 6101d468b2c..a138de652d5 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
@@ -251,7 +251,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
if (type < EncounterCount)
{
- TC_LOG_DEBUG("scripts", "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
+ TC_LOG_DEBUG("scripts", "[ToCr] BossState(type {}) {} = state {};", type, GetBossState(type), state);
if (state == FAIL)
{
EventStage = (type == DATA_NORTHREND_BEASTS ? 666 : 0);
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index 821f497c2c8..dc6359628c3 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -147,7 +147,7 @@ struct boss_four_horsemen_baseAI : public BossAI
uint32 deathTime = cBoss->AI()->GetData(DATA_DEATH_TIME);
if (!deathTime)
{
- TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman %s is reporting not dead", cBoss->GetName().c_str());
+ TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman {} is reporting not dead", cBoss->GetName());
return 0;
}
if (!minTime || deathTime < minTime)
@@ -157,7 +157,7 @@ struct boss_four_horsemen_baseAI : public BossAI
}
else
{
- TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman with id %u is not present", uint32(boss));
+ TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman with id {} is not present", uint32(boss));
return 0;
}
return (getMSTimeDiff(minTime, maxTime) <= 15 * IN_MILLISECONDS) ? 1 : 0;
@@ -195,7 +195,7 @@ struct boss_four_horsemen_baseAI : public BossAI
}
else
{
- TC_LOG_WARN("scripts", "FourHorsemenAI: Checking if movement is finished but horseman with id %u is not present", uint32(boss));
+ TC_LOG_WARN("scripts", "FourHorsemenAI: Checking if movement is finished but horseman with id {} is not present", uint32(boss));
ResetEncounter();
return;
}
@@ -252,7 +252,7 @@ struct boss_four_horsemen_baseAI : public BossAI
}
else
{
- TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter starting but horseman with id %u is not present", uint32(boss));
+ TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter starting but horseman with id {} is not present", uint32(boss));
ResetEncounter();
return;
}
@@ -269,7 +269,7 @@ struct boss_four_horsemen_baseAI : public BossAI
if (Creature* cBoss = getHorsemanHandle(boss))
cBoss->DespawnOrUnsummon(0s, 15s);
else
- TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter resetting but horseman with id %u is not present", uint32(boss));
+ TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter resetting but horseman with id {} is not present", uint32(boss));
}
}
@@ -340,7 +340,7 @@ struct boss_four_horsemen_baseAI : public BossAI
}
else
{
- TC_LOG_WARN("scripts", "FourHorsemenAI: %s died but horseman with id %u is not present", me->GetName().c_str(), uint32(boss));
+ TC_LOG_WARN("scripts", "FourHorsemenAI: {} died but horseman with id {} is not present", me->GetName(), uint32(boss));
ResetEncounter();
}
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index b24321559f9..c5f5964dc57 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -430,7 +430,7 @@ struct boss_gothik : public BossAI
{
if (RAID_MODE(waves10,waves25).size() <= _waveCount) // bounds check
{
- TC_LOG_INFO("scripts", "GothikAI: Wave count %d is out of range for difficulty %d.", _waveCount, static_cast<uint32>(GetDifficulty()));
+ TC_LOG_INFO("scripts", "GothikAI: Wave count {} is out of range for difficulty {}.", _waveCount, static_cast<uint32>(GetDifficulty()));
break;
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 82091dce218..974362634c5 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -258,7 +258,7 @@ class spell_gen_arena_drink : public AuraScript
{
if (spellInfo->GetEffects().empty() || !spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_MOD_POWER_REGEN))
{
- TC_LOG_ERROR("spells", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
+ TC_LOG_ERROR("spells", "Aura {} structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
return false;
}
@@ -4346,7 +4346,7 @@ class spell_gen_mixology_bonus : public AuraScript
SetBonusValueForEffect(EFFECT_0, 5, aurEff);
break;
default:
- TC_LOG_ERROR("spells", "SpellId %u couldn't be processed in spell_gen_mixology_bonus", GetId());
+ TC_LOG_ERROR("spells", "SpellId {} couldn't be processed in spell_gen_mixology_bonus", GetId());
break;
}
amount += bonus;
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index a9be7b8b558..a1673dbcd29 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1208,7 +1208,7 @@ class spell_item_flask_of_the_north : public SpellScript
if (possibleSpells.empty())
{
- TC_LOG_WARN("spells", "Missing spells for class %u in script spell_item_flask_of_the_north", caster->GetClass());
+ TC_LOG_WARN("spells", "Missing spells for class {} in script spell_item_flask_of_the_north", caster->GetClass());
return;
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 174ce6d9819..f8b6e070192 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -576,7 +576,7 @@ class spell_pri_holy_words : public AuraScript
cdReductionEffIndex = EFFECT_1;
break;
default:
- TC_LOG_WARN("spells.priest", "HolyWords aura has been proced by an unknown spell: %u", GetSpellInfo()->Id);
+ TC_LOG_WARN("spells.priest", "HolyWords aura has been proced by an unknown spell: {}", GetSpellInfo()->Id);
return;
}
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 4372d3bbf24..826101f6989 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -220,7 +220,7 @@ class spell_rog_deadly_poison : public SpellScript
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->EffectArg[s], DIFFICULTY_NONE);
if (!spellInfo)
{
- TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().ToString().c_str(), enchant->EffectArg[s]);
+ TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant {}, player (Name: {}, {}) cast unknown spell {}", enchant->ID, player->GetName(), player->GetGUID().ToString(), enchant->EffectArg[s]);
continue;
}
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index fbebd791da9..cec8cf6191f 100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
@@ -38,26 +38,26 @@ class ChatLogScript : public PlayerScript
switch (type)
{
case CHAT_MSG_SAY:
- TC_LOG_CHAT("say", "Player %s says (language %u): %s",
- player->GetName().c_str(), lang, msg.c_str());
+ TC_LOG_CHAT("say", "Player {} says (language {}): {}",
+ player->GetName(), lang, msg);
break;
case CHAT_MSG_EMOTE:
- TC_LOG_CHAT("emote", "Player %s emotes: %s",
- player->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("emote", "Player {} emotes: {}",
+ player->GetName(), msg);
break;
case CHAT_MSG_YELL:
- TC_LOG_CHAT("yell", "Player %s yells (language %u): %s",
- player->GetName().c_str(), lang, msg.c_str());
+ TC_LOG_CHAT("yell", "Player {} yells (language {}): {}",
+ player->GetName(), lang, msg);
break;
}
}
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
{
- TC_LOG_CHAT("whisper", "Player %s tells %s: %s",
- player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("whisper", "Player {} tells {}: {}",
+ player->GetName(), receiver ? receiver->GetName().c_str() : "<unknown>", msg);
}
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
@@ -67,38 +67,38 @@ class ChatLogScript : public PlayerScript
switch (type)
{
case CHAT_MSG_PARTY:
- TC_LOG_CHAT("party", "Player %s tells group with leader %s: %s",
- player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("party", "Player {} tells group with leader {}: {}",
+ player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg);
break;
case CHAT_MSG_PARTY_LEADER:
- TC_LOG_CHAT("party", "Leader %s tells group: %s",
- player->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("party", "Leader {} tells group: {}",
+ player->GetName(), msg);
break;
case CHAT_MSG_RAID:
- TC_LOG_CHAT("raid", "Player %s tells raid with leader %s: %s",
- player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("raid", "Player {} tells raid with leader {}: {}",
+ player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg);
break;
case CHAT_MSG_RAID_LEADER:
- TC_LOG_CHAT("raid", "Leader player %s tells raid: %s",
- player->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("raid", "Leader player {} tells raid: {}",
+ player->GetName(), msg);
break;
case CHAT_MSG_RAID_WARNING:
- TC_LOG_CHAT("raid", "Leader player %s warns raid with: %s",
- player->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("raid", "Leader player {} warns raid with: {}",
+ player->GetName(), msg);
break;
case CHAT_MSG_INSTANCE_CHAT:
- TC_LOG_CHAT("bg", "Player %s tells instance with leader %s: %s",
- player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("bg", "Player {} tells instance with leader {}: {}",
+ player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg);
break;
case CHAT_MSG_INSTANCE_CHAT_LEADER:
- TC_LOG_CHAT("bg", "Leader player %s tells instance: %s",
- player->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("bg", "Leader player {} tells instance: {}",
+ player->GetName(), msg);
break;
}
}
@@ -108,13 +108,13 @@ class ChatLogScript : public PlayerScript
switch (type)
{
case CHAT_MSG_GUILD:
- TC_LOG_CHAT("guild", "Player %s tells guild %s: %s",
- player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("guild", "Player {} tells guild {}: {}",
+ player->GetName(), guild ? guild->GetName().c_str() : "<unknown>", msg);
break;
case CHAT_MSG_OFFICER:
- TC_LOG_CHAT("guild.officer", "Player %s tells guild %s officers: %s",
- player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
+ TC_LOG_CHAT("guild.officer", "Player {} tells guild {} officers: {}",
+ player->GetName(), guild ? guild->GetName().c_str() : "<unknown>", msg);
break;
}
}
@@ -129,14 +129,14 @@ class ChatLogScript : public PlayerScript
if (isSystem)
{
- TC_LOG_CHAT("system", "Player %s tells channel %s: %s",
- player->GetName().c_str(), channel->GetName().c_str(), msg.c_str());
+ TC_LOG_CHAT("system", "Player {} tells channel {}: {}",
+ player->GetName(), channel->GetName(), msg);
}
else
{
std::string channelName = channel ? channel->GetName() : "<unknown>";
- TC_LOG_CHAT("channel." + channelName, "Player %s tells channel %s: %s",
- player->GetName().c_str(), channelName.c_str(), msg.c_str());
+ TC_LOG_CHAT("channel." + channelName, "Player {} tells channel {}: {}",
+ player->GetName(), channelName, msg);
}
}
};
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index b5e7b2c1b29..1a9a4e13ef2 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -170,7 +170,7 @@ public:
if (Spell)
creature->CastSpell(player, Spell, false);
else
- TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->GetFaction());
+ TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry {}) but faction ({}) are not expected by script.", creature->GetEntry(), creature->GetFaction());
}
}
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index f7304de7a77..426506fb229 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -299,7 +299,7 @@ bool EquippedOk(Player* player, uint32 spellId)
if (item && item->GetTemplate()->GetRequiredSpell() == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- TC_LOG_DEBUG("scripts", "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
+ TC_LOG_DEBUG("scripts", "player attempt to unlearn spell {}, but item {} is equipped.", reqSpell, item->GetEntry());
return false;
}
}