diff options
author | silinoron <none@none> | 2010-08-23 19:56:47 -0700 |
---|---|---|
committer | silinoron <none@none> | 2010-08-23 19:56:47 -0700 |
commit | 8649bee17fdd477623465a0ef22abe4d80b74fc3 (patch) | |
tree | f652ac8f180d88345cfd5ecdc779b4296d154189 /src/server/game/Maps/Map.cpp | |
parent | b30800e9bcc38faf4bcbe443240a6d0797ad88e5 (diff) |
Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index fd037e80737..9fb6624193c 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -345,7 +345,7 @@ Map::EnsureGridCreated(const GridPair &p) { 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.getConfig(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 @@ -769,7 +769,7 @@ Map::Remove(T *obj, bool remove) if (remove) { // if option set then object already saved at this moment - if (!sWorld.getConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY)) + if (!sWorld.getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY)) obj->SaveRespawnTime(); DeleteFromWorld(obj); } @@ -2224,7 +2224,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.getConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); + m_unloadTimer = std::max(sWorld.getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY); } InstanceMap::~InstanceMap() @@ -2428,7 +2428,7 @@ 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()); //if last player set unload timer if (!m_unloadTimer && m_mapRefManager.getSize() == 1) - m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld.getConfig(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); |