aboutsummaryrefslogtreecommitdiff
path: root/src/game/MapManager.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-18 19:40:06 -0600
committermegamage <none@none>2008-11-18 19:40:06 -0600
commitea68727d27e699200236b3b7ecbe36b7f7061cfc (patch)
treeefacc175380a18af301a91170bc35cb851a64701 /src/game/MapManager.cpp
parent78f343397c5d5e4cb99e84a9ebecc299e988e13d (diff)
*Merge from Mangos. Add MapReference. Author: hunuza.
*Also re-commit the patches reverted in 255. --HG-- branch : trunk
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r--src/game/MapManager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 86206fef49b..34aefdff074 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
{
@@ -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;
}