aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rw-r--r--src/server/game/Maps/MapManager.cpp45
1 files changed, 6 insertions, 39 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 2d9366cba23..3ac965acbb4 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -37,12 +37,11 @@
#include "WorldSession.h"
#include "Opcodes.h"
-extern GridState* si_GridStates[]; // debugging code, should be deleted some day
-
MapManager::MapManager()
{
i_gridCleanUpDelay = sWorld->getIntConfig(CONFIG_INTERVAL_GRIDCLEAN);
i_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE));
+ _nextInstanceId = 0;
}
MapManager::~MapManager() { }
@@ -51,13 +50,6 @@ void MapManager::Initialize()
{
Map::InitStateMachine();
- // debugging code, should be deleted some day
- {
- for (uint8 i = 0; i < MAX_GRID_STATE; ++i)
- i_GridStates[i] = si_GridStates[i];
-
- i_GridStateErrorCount = 0;
- }
int num_threads(sWorld->getIntConfig(CONFIG_NUMTHREADS));
// Start mtmaps if needed.
if (num_threads > 0 && m_updater.activate(num_threads) == -1)
@@ -70,31 +62,6 @@ void MapManager::InitializeVisibilityDistanceInfo()
(*iter).second->InitVisibilityDistance();
}
-// debugging code, should be deleted some day
-void MapManager::checkAndCorrectGridStatesArray()
-{
- bool ok = true;
- for (int i=0; i<MAX_GRID_STATE; i++)
- {
- if (i_GridStates[i] != si_GridStates[i])
- {
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!");
- ok = false;
- si_GridStates[i] = i_GridStates[i];
- }
- #ifdef TRINITY_DEBUG
- // inner class checking only when compiled with debug
- if (!si_GridStates[i]->checkMagic())
- {
- ok = false;
- si_GridStates[i]->setMagic();
- }
- #endif
- }
- if (!ok)
- ++i_GridStateErrorCount;
-}
-
Map* MapManager::CreateBaseMap(uint32 id)
{
Map* map = FindBaseMap(id);
@@ -195,7 +162,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
// probably there must be special opcode, because client has this string constant in GlobalStrings.lua
/// @todo this is not a good place to send the message
player->GetSession()->SendAreaTriggerMessage(player->GetSession()->GetTrinityString(LANG_INSTANCE_RAID_GROUP_ONLY), mapName);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName().c_str(), mapName);
return false;
}
}
@@ -219,15 +186,15 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
{
WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE);
player->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName().c_str(), mapName);
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
player->ResurrectPlayer(0.5f, false);
player->SpawnCorpseBones();
}
else
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
+ TC_LOG_DEBUG("maps", "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
}
//Get instance where player's group is bound & its map
@@ -404,7 +371,7 @@ uint32 MapManager::GenerateInstanceId()
if (newInstanceId == _nextInstanceId)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Instance ID overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("maps", "Instance ID overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}