From cee745894c599e6860b3bb112ee85054aad00899 Mon Sep 17 00:00:00 2001 From: tartalo Date: Sat, 24 Oct 2009 15:39:32 +0200 Subject: Violet Hold: Portal timer adjustments & fixes Zuramat the Obliberator script, by Manuel --HG-- branch : trunk --- src/game/MapManager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/game/MapManager.cpp') diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 5b1dc609d56..7947c8d0089 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -263,11 +263,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player) int8 maxPlayers = (player->GetDifficulty() == DIFFICULTY_HEROIC) ? instance->maxPlayersHeroic : instance->maxPlayers; if (maxPlayers != -1) //-1: unlimited access { - Map::PlayerList const &players = boundedMap->GetPlayers(); - uint8 count = 0; - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - ++count; - if (count >= maxPlayers) + if (boundedMap->GetPlayers().getSize() >= maxPlayers) { sLog.outDebug("MAP: Player '%s' can't enter instance '%s' because it's full.", player->GetName(), mapName); player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS); -- cgit v1.2.3