diff options
author | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
---|---|---|
committer | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
commit | 928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch) | |
tree | b30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/Maps/Map.cpp | |
parent | 95daf7998fc3b772fdcd70087c12db80bd5a031a (diff) |
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rwxr-xr-x | src/server/game/Maps/Map.cpp | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 36bc959c280..b2f7eee7baa 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -33,7 +33,7 @@ #define DEFAULT_GRID_EXPIRY 300 #define MAX_GRID_LOAD_TIME 50 -#define MAX_CREATURE_ATTACK_RADIUS (45.0f * sWorld.getRate(RATE_CREATURE_AGGRO)) +#define MAX_CREATURE_ATTACK_RADIUS (45.0f * sWorld->getRate(RATE_CREATURE_AGGRO)) GridState* si_GridStates[MAX_GRID_STATE]; @@ -53,27 +53,27 @@ Map::~Map() } if (!m_scriptSchedule.empty()) - sWorld.DecreaseScheduledScriptCount(m_scriptSchedule.size()); + sWorld->DecreaseScheduledScriptCount(m_scriptSchedule.size()); } bool Map::ExistMap(uint32 mapid,int gx,int gy) { - int len = sWorld.GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1; + int len = sWorld->GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1; char* tmp = new char[len]; - snprintf(tmp, len, (char *)(sWorld.GetDataPath()+"maps/%03u%02u%02u.map").c_str(),mapid,gx,gy); + snprintf(tmp, len, (char *)(sWorld->GetDataPath()+"maps/%03u%02u%02u.map").c_str(),mapid,gx,gy); bool ret = false; FILE *pf=fopen(tmp,"rb"); if (!pf) - sLog.outError("Map file '%s': does not exist!",tmp); + sLog->outError("Map file '%s': does not exist!",tmp); else { map_fileheader header; if (fread(&header, sizeof(header), 1, pf) == 1) { if (header.mapMagic != uint32(MAP_MAGIC) || header.versionMagic != uint32(MAP_VERSION_MAGIC)) - sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.",tmp); + sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.",tmp); else ret = true; } @@ -89,11 +89,11 @@ bool Map::ExistVMap(uint32 mapid,int gx,int gy) { if (vmgr->isMapLoadingEnabled()) { - bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(), mapid, gx,gy); + bool exists = vmgr->existsMap((sWorld->GetDataPath()+ "vmaps").c_str(), mapid, gx,gy); if (!exists) { std::string name = vmgr->getDirFileName(mapid,gx,gy); - sLog.outError("VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld.GetDataPath()+"vmaps/"+name).c_str()); + sLog->outError("VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str()); return false; } } @@ -105,17 +105,17 @@ bool Map::ExistVMap(uint32 mapid,int gx,int gy) void Map::LoadVMap(int gx,int gy) { // x and y are swapped !! - int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld.GetDataPath()+ "vmaps").c_str(), GetId(), gx,gy); + int vmapLoadResult = VMAP::VMapFactory::createOrGetVMapManager()->loadMap((sWorld->GetDataPath()+ "vmaps").c_str(), GetId(), gx,gy); switch(vmapLoadResult) { case VMAP::VMAP_LOAD_RESULT_OK: - sLog.outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); + sLog->outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); break; case VMAP::VMAP_LOAD_RESULT_ERROR: - sLog.outDetail("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); + sLog->outDetail("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); break; case VMAP::VMAP_LOAD_RESULT_IGNORED: - sLog.outStaticDebug("Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); + sLog->outStaticDebug("Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy); break; } } @@ -142,7 +142,7 @@ void Map::LoadMap(int gx,int gy, bool reload) //map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?) if (GridMaps[gx][gy]) { - sLog.outDetail("Unloading previously loaded map %u before reloading.",GetId()); + sLog->outDetail("Unloading previously loaded map %u before reloading.",GetId()); sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy); delete (GridMaps[gx][gy]); @@ -151,15 +151,15 @@ void Map::LoadMap(int gx,int gy, bool reload) // map file name char *tmp=NULL; - int len = sWorld.GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1; + int len = sWorld->GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1; tmp = new char[len]; - snprintf(tmp, len, (char *)(sWorld.GetDataPath()+"maps/%03u%02u%02u.map").c_str(),GetId(),gx,gy); - sLog.outDetail("Loading map %s",tmp); + snprintf(tmp, len, (char *)(sWorld->GetDataPath()+"maps/%03u%02u%02u.map").c_str(),GetId(),gx,gy); + sLog->outDetail("Loading map %s",tmp); // loading data GridMaps[gx][gy] = new GridMap(); if (!GridMaps[gx][gy]->loadData(tmp)) { - sLog.outError("Error loading map file: \n %s\n", tmp); + sLog->outError("Error loading map file: \n %s\n", tmp); } delete [] tmp; @@ -255,7 +255,7 @@ void Map::SwitchGridContainers(T* obj, bool on) CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) { - sLog.outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + sLog->outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); return; } @@ -263,7 +263,7 @@ void Map::SwitchGridContainers(T* obj, bool on) if (!loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y))) return; - sLog.outStaticDebug("Switch object " UI64FMTD " from grid[%u,%u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + sLog->outStaticDebug("Switch object " UI64FMTD " from grid[%u,%u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(ngrid != NULL); @@ -305,7 +305,7 @@ void Map::DeleteFromWorld(T* obj) template<> void Map::DeleteFromWorld(Player* pl) { - sObjectAccessor.RemoveObject(pl); + sObjectAccessor->RemoveObject(pl); delete pl; } @@ -317,9 +317,9 @@ Map::EnsureGridCreated(const GridPair &p) ACE_GUARD(ACE_Thread_Mutex, Guard, Lock); if (!getNGrid(p.x_coord, p.y_coord)) { - sLog.outDebug("Creating grid[%u,%u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); + sLog->outDebug("Creating grid[%u,%u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); - setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld.getBoolConfig(CONFIG_GRID_UNLOAD)), + setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)), p.x_coord, p.y_coord); // build a linkage between this map and NGridType @@ -349,11 +349,11 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player) { if (player) { - sLog.outStaticDebug("Player %s enter cell[%u,%u] triggers loading of grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), GetId()); + sLog->outStaticDebug("Player %s enter cell[%u,%u] triggers loading of grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), GetId()); } else { - sLog.outStaticDebug("Active object nearby triggers loading of grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), GetId()); + sLog->outStaticDebug("Active object nearby triggers loading of grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), GetId()); } ResetGridExpiry(*grid, 0.1f); @@ -369,7 +369,7 @@ bool Map::EnsureGridLoaded(const Cell &cell) ASSERT(grid != NULL); if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY())) { - sLog.outDebug("Loading grid[%u,%u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId); + sLog->outDebug("Loading grid[%u,%u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId); setGridObjectDataLoaded(true,cell.GridX(), cell.GridY()); @@ -377,7 +377,7 @@ bool Map::EnsureGridLoaded(const Cell &cell) loader.LoadN(); // Add resurrectable corpses to world object list in grid - sObjectAccessor.AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this); + sObjectAccessor->AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this); return true; } @@ -398,7 +398,7 @@ bool Map::Add(Player *player) CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) { - sLog.outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), p.x_coord, p.y_coord); + sLog->outError("Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), p.x_coord, p.y_coord); return false; } @@ -429,7 +429,7 @@ Map::Add(T *obj) CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) { - sLog.outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + sLog->outError("Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); return; } @@ -455,7 +455,7 @@ Map::Add(T *obj) if (obj->isActiveObject()) AddToActive(obj); - sLog.outStaticDebug("Object %u enters grid[%u,%u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY()); + sLog->outStaticDebug("Object %u enters grid[%u,%u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY()); //something, such as vehicle, needs to be update immediately //also, trigger needs to cast spell, if not update, cannot see visual @@ -664,15 +664,15 @@ void Map::Remove(Player *player, bool remove) CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) - sLog.outCrash("Map::Remove: Player is in invalid cell!"); + sLog->outCrash("Map::Remove: Player is in invalid cell!"); else { Cell cell(p); if (!getNGrid(cell.data.Part.grid_x, cell.data.Part.grid_y)) - sLog.outError("Map::Remove() i_grids was NULL x:%d, y:%d",cell.data.Part.grid_x,cell.data.Part.grid_y); + sLog->outError("Map::Remove() i_grids was NULL x:%d, y:%d",cell.data.Part.grid_x,cell.data.Part.grid_y); else { - sLog.outStaticDebug("Remove player %s from grid[%u,%u]", player->GetName(), cell.GridX(), cell.GridY()); + sLog->outStaticDebug("Remove player %s from grid[%u,%u]", player->GetName(), cell.GridX(), cell.GridY()); NGridType *grid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(grid != NULL); @@ -697,13 +697,13 @@ Map::Remove(T *obj, bool remove) CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) - sLog.outError("Map::Remove: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + sLog->outError("Map::Remove: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); else { Cell cell(p); if (loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y))) { - sLog.outStaticDebug("Remove object " UI64FMTD " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y); + sLog->outStaticDebug("Remove object " UI64FMTD " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y); NGridType *grid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(grid != NULL); @@ -717,7 +717,7 @@ Map::Remove(T *obj, bool remove) if (remove) { // if option set then object already saved at this moment - if (!sWorld.getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY)) + if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY)) obj->SaveRespawnTime(); DeleteFromWorld(obj); } @@ -738,7 +738,7 @@ Map::PlayerRelocation(Player *player, float x, float y, float z, float orientati if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell)) { - sLog.outStaticDebug("Player %s relocation grid[%u,%u]cell[%u,%u]->grid[%u,%u]cell[%u,%u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outStaticDebug("Player %s relocation grid[%u,%u]cell[%u,%u]->grid[%u,%u]cell[%u,%u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); NGridType* oldGrid = getNGrid(old_cell.GridX(), old_cell.GridY()); RemoveFromGrid(player, oldGrid,old_cell); @@ -770,8 +770,8 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell)) { #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) added to moving list from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) added to moving list from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif AddCreatureToMoveList(creature, x, y, z, ang); // in diffcell/diffgrid case notifiers called at finishing move creature in Map::MoveAllCreaturesInMoveList @@ -823,8 +823,8 @@ void Map::MoveAllCreaturesInMoveList() { // ... or unload (if respawn grid also not loaded) #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.",c->GetGUIDLow(),c->GetEntry()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.",c->GetGUIDLow(),c->GetEntry()); #endif AddObjectToRemoveList(c); } @@ -841,8 +841,8 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) if (old_cell.DiffCell(new_cell)) { #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) moved in grid[%u,%u] from cell[%u,%u] to cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) moved in grid[%u,%u] from cell[%u,%u] to cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -851,8 +851,8 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) else { #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) moved in same grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) moved in same grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); #endif } @@ -865,8 +865,8 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) EnsureGridLoadedAtEnter(new_cell); #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Active creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Active creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -879,8 +879,8 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) if (loaded(GridPair(new_cell.GridX(), new_cell.GridY()))) { #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -892,8 +892,8 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) // fail to move: normal creature attempt move to unloaded grid #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) attempted to move from grid[%u,%u]cell[%u,%u] to unloaded grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) attempted to move from grid[%u,%u]cell[%u,%u] to unloaded grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif return false; } @@ -910,8 +910,8 @@ bool Map::CreatureRespawnRelocation(Creature *c) c->GetMotionMaster()->Clear(); #ifdef TRINITY_DEBUG - if ((sLog.getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog.outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to respawn grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); + if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) + sLog->outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to respawn grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); #endif // teleport it to respawn point (like normal respawn if player see) @@ -936,7 +936,7 @@ bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll) if (!unloadAll && ActiveObjectsNearGrid(x, y)) return false; - sLog.outDebug("Unloading grid[%u,%u] for map %u", x,y, GetId()); + sLog->outDebug("Unloading grid[%u,%u] for map %u", x,y, GetId()); ObjectGridUnloader unloader(*grid); @@ -986,7 +986,7 @@ bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll) GridMaps[gx][gy] = NULL; } - sLog.outStaticDebug("Unloading grid[%u,%u] for map %u finished", x,y, GetId()); + sLog->outStaticDebug("Unloading grid[%u,%u] for map %u finished", x,y, GetId()); return true; } @@ -1000,7 +1000,7 @@ void Map::RemoveAllPlayers() if (!plr->IsBeingTeleportedFar()) { // this is happening for bg - sLog.outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", plr->GetName(), GetId()); + sLog->outError("Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", plr->GetName(), GetId()); plr->TeleportTo(plr->m_homebindMapId, plr->m_homebindX, plr->m_homebindY, plr->m_homebindZ, plr->GetOrientation()); } } @@ -1072,28 +1072,28 @@ bool GridMap::loadData(char *filename) // loadup area data if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize)) { - sLog.outError("Error loading map area data\n"); + sLog->outError("Error loading map area data\n"); fclose(in); return false; } // loadup height data if (header.heightMapOffset && !loadHeihgtData(in, header.heightMapOffset, header.heightMapSize)) { - sLog.outError("Error loading map height data\n"); + sLog->outError("Error loading map height data\n"); fclose(in); return false; } // loadup liquid data if (header.liquidMapOffset && !loadLiquidData(in, header.liquidMapOffset, header.liquidMapSize)) { - sLog.outError("Error loading map liquids data\n"); + sLog->outError("Error loading map liquids data\n"); fclose(in); return false; } fclose(in); return true; } - sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename); + sLog->outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename); fclose(in); return false; } @@ -1646,7 +1646,7 @@ bool Map::IsOutdoors(float x, float y, float z) const WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId); if(wmoEntry) { - sLog.outStaticDebug("Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); + sLog->outStaticDebug("Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId); atEntry = GetAreaEntryByAreaID(wmoEntry->areaId); } return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry); @@ -1726,7 +1726,7 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp uint32 liquid_type; if (vmgr->GetLiquidLevel(GetId(), x, y, z, ReqLiquidType, liquid_level, ground_level, liquid_type)) { - sLog.outDebug("getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type); + sLog->outDebug("getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type); // Check water level and ground level if (liquid_level > ground_level && z > ground_level - 2) { @@ -1834,7 +1834,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const Cell xy_cell(xy_val); if (xy_cell != cur_cell) { - sLog.outDebug("Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u,%u]cell[%u,%u] instead of grid[%u,%u]cell[%u,%u]", + sLog->outDebug("Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u,%u]cell[%u,%u] instead of grid[%u,%u]cell[%u,%u]", c->GetGUIDLow(), c->GetPositionX(),c->GetPositionY(),(moved ? "final" : "original"), cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(), @@ -1847,7 +1847,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const const char* Map::GetMapName() const { - return i_mapEntry ? i_mapEntry->name[sWorld.GetDefaultDbcLocale()] : "UNNAMEDMAP\x0"; + return i_mapEntry ? i_mapEntry->name[sWorld->GetDefaultDbcLocale()] : "UNNAMEDMAP\x0"; } void Map::UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair) @@ -1876,7 +1876,7 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpai void Map::SendInitSelf(Player * player) { - sLog.outDetail("Creating player data for himself %u", player->GetGUIDLow()); + sLog->outDetail("Creating player data for himself %u", player->GetGUIDLow()); UpdateData data; @@ -1960,7 +1960,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y) { if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS) { - sLog.outError("map::setNGrid() Invalid grid coordinates found: %d, %d!",x,y); + sLog->outError("map::setNGrid() Invalid grid coordinates found: %d, %d!",x,y); ASSERT(false); } i_grids[x][y] = grid; @@ -1992,7 +1992,7 @@ void Map::AddObjectToRemoveList(WorldObject *obj) obj->CleanupsBeforeDelete(false); // remove or simplify at least cross referenced links i_objectsToRemove.insert(obj); - //sLog.outDebug("Object (GUID: %u TypeId: %u) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId()); + //sLog->outDebug("Object (GUID: %u TypeId: %u) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId()); } void Map::AddObjectToSwitchList(WorldObject *obj, bool on) @@ -2028,7 +2028,7 @@ void Map::RemoveAllObjectsInRemoveList() } } - //sLog.outDebug("Object remover 1 check."); + //sLog->outDebug("Object remover 1 check."); while (!i_objectsToRemove.empty()) { std::set<WorldObject*>::iterator itr = i_objectsToRemove.begin(); @@ -2038,9 +2038,9 @@ void Map::RemoveAllObjectsInRemoveList() { case TYPEID_CORPSE: { - Corpse* corpse = sObjectAccessor.GetCorpse(*obj, obj->GetGUID()); + Corpse* corpse = ObjectAccessor::GetCorpse(*obj, obj->GetGUID()); if (!corpse) - sLog.outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow()); + sLog->outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow()); else Remove(corpse,true); break; @@ -2058,14 +2058,14 @@ void Map::RemoveAllObjectsInRemoveList() Remove(obj->ToCreature(),true); break; default: - sLog.outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.",obj->GetTypeId()); + sLog->outError("Non-grid object (TypeId: %u) is in grid object remove list, ignored.",obj->GetTypeId()); break; } i_objectsToRemove.erase(itr); } - //sLog.outDebug("Object remover 2 check."); + //sLog->outDebug("Object remover 2 check."); } uint32 Map::GetPlayersCountExceptGMs() const @@ -2138,7 +2138,7 @@ void Map::AddToActive(Creature* c) else { GridPair p2 = Trinity::ComputeGridPair(c->GetPositionX(), c->GetPositionY()); - sLog.outError("Active creature (GUID: %u Entry: %u) added to grid[%u,%u] but spawn grid[%u,%u] was not loaded.", + sLog->outError("Active creature (GUID: %u Entry: %u) added to grid[%u,%u] but spawn grid[%u,%u] was not loaded.", c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } @@ -2159,7 +2159,7 @@ void Map::RemoveFromActive(Creature* c) else { GridPair p2 = Trinity::ComputeGridPair(c->GetPositionX(), c->GetPositionY()); - sLog.outError("Active creature (GUID: %u Entry: %u) removed from grid[%u,%u] but spawn grid[%u,%u] was not loaded.", + sLog->outError("Active creature (GUID: %u Entry: %u) removed from grid[%u,%u] but spawn grid[%u,%u] was not loaded.", c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord); } } @@ -2187,7 +2187,7 @@ InstanceMap::InstanceMap(uint32 id, time_t expiry, uint32 InstanceId, uint8 Spaw // the timer is started by default, and stopped when the first player joins // this make sure it gets unloaded if for some reason no player joins - m_unloadTimer = std::max(sWorld.getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); + m_unloadTimer = std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); } InstanceMap::~InstanceMap() @@ -2210,7 +2210,7 @@ bool InstanceMap::CanEnter(Player *player) { if (player->GetMapRef().getTarget() == this) { - sLog.outError("InstanceMap::CanEnter - player %s(%u) already in map %d,%d,%d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); + sLog->outError("InstanceMap::CanEnter - player %s(%u) already in map %d,%d,%d!", player->GetName(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); ASSERT(false); return false; } @@ -2223,7 +2223,7 @@ bool InstanceMap::CanEnter(Player *player) uint32 maxPlayers = GetMaxPlayers(); if (GetPlayersCountExceptGMs() >= maxPlayers) { - sLog.outDetail("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName()); + sLog->outDetail("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName()); player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS); return false; } @@ -2287,7 +2287,7 @@ bool InstanceMap::Add(Player *player) InstanceSave *mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!mapSave) { - sLog.outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId()); + sLog->outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId()); mapSave = sInstanceSaveMgr->AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true); } @@ -2298,7 +2298,7 @@ bool InstanceMap::Add(Player *player) // cannot enter other instances if bound permanently if (playerBind->save != mapSave) { - sLog.outError("InstanceMap::Add: player %s(%d) is permanently bound to instance %d,%d,%d,%d,%d,%d but he is being put into instance %d,%d,%d,%d,%d,%d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset()); + sLog->outError("InstanceMap::Add: player %s(%d) is permanently bound to instance %d,%d,%d,%d,%d,%d but he is being put into instance %d,%d,%d,%d,%d,%d", player->GetName(), player->GetGUIDLow(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset()); return false; } } @@ -2311,8 +2311,8 @@ bool InstanceMap::Add(Player *player) InstanceGroupBind *groupBind = pGroup->GetBoundInstance(this); if (playerBind) { - sLog.outError("InstanceMap::Add: player %s(%d) is being put into instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); - if (groupBind) sLog.outError("InstanceMap::Add: the group is bound to the instance %d,%d,%d,%d,%d,%d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); + sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); + if (groupBind) sLog->outError("InstanceMap::Add: the group is bound to the instance %d,%d,%d,%d,%d,%d", groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); //ASSERT(false); return false; } @@ -2324,15 +2324,15 @@ bool InstanceMap::Add(Player *player) // cannot jump to a different instance without resetting it if (groupBind->save != mapSave) { - sLog.outError("InstanceMap::Add: player %s(%d) is being put into instance %d,%d,%d but he is in group %d which is bound to instance %d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(pGroup->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty()); + sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d,%d,%d but he is in group %d which is bound to instance %d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(pGroup->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty()); if (mapSave) - sLog.outError("MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount()); + sLog->outError("MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount()); else - sLog.outError("MapSave NULL"); + sLog->outError("MapSave NULL"); if (groupBind->save) - sLog.outError("GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount()); + sLog->outError("GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount()); else - sLog.outError("GroupBind save NULL"); + sLog->outError("GroupBind save NULL"); return false; } // if the group/leader is permanently bound to the instance @@ -2362,7 +2362,7 @@ bool InstanceMap::Add(Player *player) // first player enters (no players yet) SetResetSchedule(false); - sLog.outDetail("MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outDetail("MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName()); // initialize unload state m_unloadTimer = 0; m_resetAfterUnload = false; @@ -2388,10 +2388,10 @@ void InstanceMap::Update(const uint32& t_diff) void InstanceMap::Remove(Player *player, bool remove) { - sLog.outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); //if last player set unload timer if (!m_unloadTimer && m_mapRefManager.getSize() == 1) - m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld.getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); + m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); Map::Remove(player, remove); // for normal instances schedule the reset after all players have left SetResetSchedule(true); @@ -2424,7 +2424,7 @@ void InstanceMap::CreateInstanceData(bool load) std::string data = fields[0].GetString(); if (data != "") { - sLog.outDebug("Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId); + sLog->outDebug("Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId); i_data->Load(data.c_str()); } } @@ -2478,7 +2478,7 @@ void InstanceMap::PermBindAllPlayers(Player *player) InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!save) { - sLog.outError("Cannot bind players, no instance save available for map!"); + sLog->outError("Cannot bind players, no instance save available for map!"); return; } @@ -2528,7 +2528,7 @@ void InstanceMap::SetResetSchedule(bool on) if (IsDungeon() && !HavePlayers() && !IsRaidOrHeroicDungeon()) { InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); - if (!save) sLog.outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, no save available for instance %d of %d", on ? "on" : "off", GetInstanceId(), GetId()); + if (!save) sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, no save available for instance %d of %d", on ? "on" : "off", GetInstanceId(), GetId()); else sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId())); } } @@ -2584,7 +2584,7 @@ bool BattlegroundMap::CanEnter(Player * player) { if (player->GetMapRef().getTarget() == this) { - sLog.outError("BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow()); + sLog->outError("BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow()); ASSERT(false); return false; } @@ -2612,7 +2612,7 @@ bool BattlegroundMap::Add(Player * player) void BattlegroundMap::Remove(Player *player, bool remove) { - sLog.outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); + sLog->outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName(), GetInstanceId(), GetMapName()); Map::Remove(player, remove); } |