diff options
author | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
commit | ae8a27bbb758dd2485d9bea14ccd8b892f626371 (patch) | |
tree | 213402aa6ce31963a4a329cbb261fd88db6a0bdd /src/game/MapManager.cpp | |
parent | 837ce55de88e33825eb66814d07d33c1f869f7a7 (diff) | |
parent | 71707df1dec2aa77864d9a853c34108bb6021138 (diff) |
Merged commit 269 (5f0e38da128a).
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r-- | src/game/MapManager.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 86206fef49b..26279cb76ec 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -10,12 +10,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "MapManager.h" @@ -111,7 +111,7 @@ MapManager::_GetBaseMap(uint32 id) const MapEntry* entry = sMapStore.LookupEntry(id); if (entry && entry->Instanceable()) { - m = new MapInstanced(id, i_gridCleanUpDelay, 0); + m = new MapInstanced(id, i_gridCleanUpDelay); } else { @@ -222,7 +222,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player) return true; } -void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId, uint8 mode) +void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId) { Map *m = _GetBaseMap(mapid); if (m && m->Instanceable()) @@ -246,6 +246,8 @@ MapManager::Update(time_t diff) if( !i_timer.Passed() ) return; + ObjectAccessor::Instance().UpdatePlayers(i_timer.GetCurrent()); + for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter) { checkAndCorrectGridStatesArray(); // debugging code, should be deleted some day @@ -336,7 +338,7 @@ uint32 MapManager::GetNumPlayersInInstances() MapInstanced::InstancedMaps &maps = ((MapInstanced *)map)->GetInstancedMaps(); for(MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr) if(mitr->second->IsDungeon()) - ret += ((InstanceMap*)mitr->second)->GetPlayers().size(); + ret += ((InstanceMap*)mitr->second)->GetPlayers().getSize(); } return ret; } |