mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -382,7 +382,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
|
||||
// this is probably an error state, but we'll leave it
|
||||
// and hopefully recover on the next Update
|
||||
// we still need to copy our preffix
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: Path Build failed %s", _source->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: Path Build failed {}", _source->GetGUID().ToString());
|
||||
}
|
||||
|
||||
// new path = prefix + suffix - overlap
|
||||
@@ -483,7 +483,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
|
||||
if (!_polyLength || dtStatusFailed(dtResult))
|
||||
{
|
||||
// only happens if we passed bad data to findPath(), or navmesh is messed up
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: {} Path Build failed: 0 length path", _source->GetGUID().ToString());
|
||||
BuildShortcut();
|
||||
_type = PATHFIND_NOPATH;
|
||||
return;
|
||||
@@ -492,7 +492,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
|
||||
|
||||
if (!_polyLength)
|
||||
{
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPolyPath: {} Path Build failed: 0 length path", _source->GetGUID().ToString());
|
||||
BuildShortcut();
|
||||
_type = PATHFIND_NOPATH;
|
||||
return;
|
||||
@@ -522,7 +522,7 @@ void PathGenerator::BuildPointPath(const float* startPoint, const float* endPoin
|
||||
if (_useRaycast)
|
||||
{
|
||||
// _straightLine uses raycast and it currently doesn't support building a point path, only a 2-point path with start and hitpoint/end is returned
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPointPath() called with _useRaycast for unit %s", _source->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("movement", "PathGenerator::BuildPointPath() called with _useRaycast for unit {}", _source->GetGUID().ToString());
|
||||
BuildShortcut();
|
||||
_type = PATHFIND_NOPATH;
|
||||
return;
|
||||
@@ -906,8 +906,8 @@ dtStatus PathGenerator::FindSmoothPath(float const* startPos, float const* endPo
|
||||
npolys = FixupCorridor(polys, npolys, MAX_PATH_LENGTH, visited, nvisited);
|
||||
|
||||
if (dtStatusFailed(_navMeshQuery->getPolyHeight(polys[0], result, &result[1])))
|
||||
LOG_DEBUG("maps", "PathGenerator::FindSmoothPath: Cannot find height at position X: %f Y: %f Z: %f for %s",
|
||||
result[2], result[0], result[1], _source->GetGUID().ToString().c_str());
|
||||
LOG_DEBUG("maps", "PathGenerator::FindSmoothPath: Cannot find height at position X: {} Y: {} Z: {} for {}",
|
||||
result[2], result[0], result[1], _source->GetGUID().ToString());
|
||||
result[1] += 0.5f;
|
||||
dtVcopy(iterPos, result);
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
|
||||
if (!i_path)
|
||||
{
|
||||
// No movement found for entry
|
||||
LOG_ERROR("sql.sql", "WaypointMovementGenerator::LoadPath: creature %s (%s) doesn't have waypoint path id: %u",
|
||||
creature->GetName().c_str(), creature->GetGUID().ToString().c_str(), path_id);
|
||||
LOG_ERROR("sql.sql", "WaypointMovementGenerator::LoadPath: creature {} ({}) doesn't have waypoint path id: {}",
|
||||
creature->GetName(), creature->GetGUID().ToString(), path_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
|
||||
|
||||
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
|
||||
{
|
||||
LOG_DEBUG("maps.script", "Creature movement start script %u at point %u for %s.",
|
||||
i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString().c_str());
|
||||
LOG_DEBUG("maps.script", "Creature movement start script {} at point {} for {}.",
|
||||
i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString());
|
||||
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
|
||||
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, nullptr);
|
||||
}
|
||||
@@ -365,15 +365,15 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
|
||||
{
|
||||
if (i_currentNode >= i_path.size())
|
||||
{
|
||||
LOG_INFO("misc", "TAXI NODE WAS GREATER THAN PATH SIZE, %s, POINTID: %u, NODESIZE: %lu, CURRENT: %u",
|
||||
player->GetGUID().ToString().c_str(), pointId, i_path.size(), i_currentNode);
|
||||
LOG_INFO("misc", "TAXI NODE WAS GREATER THAN PATH SIZE, {}, POINTID: {}, NODESIZE: {}, CURRENT: {}",
|
||||
player->GetGUID().ToString(), pointId, i_path.size(), i_currentNode);
|
||||
player->CleanupAfterTaxiFlight();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (i_path[i_currentNode]->mapid != player->GetMapId())
|
||||
{
|
||||
LOG_INFO("misc", "Player on different map, curmap: %u, pointmap: %u, nodesize: %lu, currentnode: %u", player->GetMapId(), i_path[i_currentNode]->mapid, i_path.size(), i_currentNode);
|
||||
LOG_INFO("misc", "Player on different map, curmap: {}, pointmap: {}, nodesize: {}, currentnode: {}", player->GetMapId(), i_path[i_currentNode]->mapid, i_path.size(), i_currentNode);
|
||||
player->CleanupAfterTaxiFlight();
|
||||
return false;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry
|
||||
{
|
||||
if (uint32 eventid = departure ? node->departureEventID : node->arrivalEventID)
|
||||
{
|
||||
LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node->index, node->path, player->GetName().c_str());
|
||||
LOG_DEBUG("maps.script", "Taxi {} event {} of node {} of path {} for player {}", departure ? "departure" : "arrival", eventid, node->index, node->path, player->GetName());
|
||||
player->GetMap()->ScriptsStart(sEventScripts, eventid, player, player);
|
||||
}
|
||||
}
|
||||
@@ -478,7 +478,7 @@ void FlightPathMovementGenerator::PreloadEndGrid()
|
||||
// Load the grid
|
||||
if (endMap)
|
||||
{
|
||||
LOG_DEBUG("movement", "Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path.size() - 1));
|
||||
LOG_DEBUG("movement", "Preloading rid ({}, {}) for map {} at node index {}/{}", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path.size() - 1));
|
||||
endMap->LoadGrid(_endGridX, _endGridY);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user