refactor(Core/Chat): PSendSysMessage to fmt (#19449)

* refactor(Core/Chat): PSendSysMessage to `fmt`
This commit is contained in:
Kitzunu
2024-07-23 23:48:46 +02:00
committed by GitHub
parent e79c89aeb1
commit 3fbded8f6b
52 changed files with 801 additions and 587 deletions
@@ -831,7 +831,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
chH.PSendSysMessage("{}", GitRevision::GetFullVersion());
}
if (uint32 guildId = sCharacterCache->GetCharacterGuildIdByGuid(pCurrChar->GetGUID()))
@@ -879,7 +879,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
// send new char string if not empty
if (!sWorld->GetNewCharString().empty())
chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
chH.PSendSysMessage("{}", sWorld->GetNewCharString());
}
}
@@ -1150,7 +1150,7 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
chH.PSendSysMessage("{}", GitRevision::GetFullVersion());
LOG_DEBUG("network.opcode", "WORLD: Sent server info");
}
+3 -3
View File
@@ -610,7 +610,7 @@ void WorldSession::HandleCharacterAuraFrozen(PreparedQueryResult result)
{
Field* fields = result->Fetch();
std::string player = fields[0].Get<std::string>();
handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player.c_str());
handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player);
} while (result->NextRow());
}
@@ -1402,11 +1402,11 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
switch (group->GetDifficultyChangePreventionReason())
{
case DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED:
ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for %u sec.", preventionTime);
ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for {} sec.", preventionTime);
break;
case DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED:
default:
ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for %u sec.", preventionTime);
ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for {} sec.", preventionTime);
break;
}