mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
This commit is contained in:
@@ -328,8 +328,8 @@ public:
|
||||
{
|
||||
// See if the script is using the same memory as another script. If this happens, it means that
|
||||
// someone forgot to allocate new memory for a script.
|
||||
TC_LOG_ERROR("scripts", "Script '%s' has same memory pointer as '%s'.",
|
||||
first->GetName().c_str(), second->GetName().c_str());
|
||||
TC_LOG_ERROR("scripts", "Script '{}' has same memory pointer as '{}'.",
|
||||
first->GetName(), second->GetName());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1263,10 +1263,10 @@ void ScriptMgr::Initialize()
|
||||
if (scriptName.empty())
|
||||
continue;
|
||||
|
||||
TC_LOG_ERROR("sql.sql", "Script '%s' is referenced by the database, but does not exist in the core!", scriptName.c_str());
|
||||
TC_LOG_ERROR("sql.sql", "Script '{}' is referenced by the database, but does not exist in the core!", scriptName);
|
||||
}
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms",
|
||||
TC_LOG_INFO("server.loading", ">> Loaded {} C++ scripts in {} ms",
|
||||
GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
@@ -2503,10 +2503,10 @@ WorldMapScript::WorldMapScript(char const* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid WorldMapScript for %u; no such map ID.", mapId);
|
||||
TC_LOG_ERROR("scripts", "Invalid WorldMapScript for {}; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsWorldMap())
|
||||
TC_LOG_ERROR("scripts", "WorldMapScript for map %u is invalid.", mapId);
|
||||
TC_LOG_ERROR("scripts", "WorldMapScript for map {} is invalid.", mapId);
|
||||
|
||||
ScriptRegistry<WorldMapScript>::Instance()->AddScript(this);
|
||||
}
|
||||
@@ -2517,10 +2517,10 @@ InstanceMapScript::InstanceMapScript(char const* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid InstanceMapScript for %u; no such map ID.", mapId);
|
||||
TC_LOG_ERROR("scripts", "Invalid InstanceMapScript for {}; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsDungeon())
|
||||
TC_LOG_ERROR("scripts", "InstanceMapScript for map %u is invalid.", mapId);
|
||||
TC_LOG_ERROR("scripts", "InstanceMapScript for map {} is invalid.", mapId);
|
||||
|
||||
ScriptRegistry<InstanceMapScript>::Instance()->AddScript(this);
|
||||
}
|
||||
@@ -2536,10 +2536,10 @@ BattlegroundMapScript::BattlegroundMapScript(char const* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid BattlegroundMapScript for %u; no such map ID.", mapId);
|
||||
TC_LOG_ERROR("scripts", "Invalid BattlegroundMapScript for {}; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsBattleground())
|
||||
TC_LOG_ERROR("scripts", "BattlegroundMapScript for map %u is invalid.", mapId);
|
||||
TC_LOG_ERROR("scripts", "BattlegroundMapScript for map {} is invalid.", mapId);
|
||||
|
||||
ScriptRegistry<BattlegroundMapScript>::Instance()->AddScript(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user