diff options
| author | Naios <naios-dev@live.de> | 2015-07-21 23:17:00 +0200 |
|---|---|---|
| committer | Naios <naios-dev@live.de> | 2015-07-22 00:32:28 +0200 |
| commit | 026ceb85b9e0e870d95cea42895e867198c156dd (patch) | |
| tree | a660500f2c575da3ff9a3b61674d2db03ed5bfea /src/server/game/Maps/Map.cpp | |
| parent | 033fc20985f17caff24a9757fe6219ce50139360 (diff) | |
Core/Logging: Enable perfect forwarding for logging format and args.
* Handle timestamp parsing though cppformat.
* Change a wrong forward -> move
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 008bb89ff4c..6e333f03bfa 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -316,7 +316,15 @@ void Map::SwitchGridContainers(Creature* obj, bool on) if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y))) return; - TC_LOG_DEBUG("maps", "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + if (sLog->ShouldLog("maps", LOG_LEVEL_DEBUG)) + { + // Extract bitfield values + uint32 const grid_x = cell.data.Part.grid_x; + uint32 const grid_y = cell.data.Part.grid_y; + + TC_LOG_DEBUG("maps", "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), grid_x, grid_y, on); + } + NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(ngrid != NULL); @@ -353,7 +361,15 @@ void Map::SwitchGridContainers(GameObject* obj, bool on) if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y))) return; - TC_LOG_DEBUG("maps", "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + if (sLog->ShouldLog("maps", LOG_LEVEL_DEBUG)) + { + // Extract bitfield values + uint32 const grid_x = cell.data.Part.grid_x; + uint32 const grid_y = cell.data.Part.grid_y; + + TC_LOG_DEBUG("maps", "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), grid_x, grid_y, on); + } + NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(ngrid != NULL); |
