diff options
author | megamage <none@none> | 2009-03-06 18:09:01 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-06 18:09:01 -0600 |
commit | 7915fd768a34604f6edf6be63bdf77fb2663d556 (patch) | |
tree | 372241b979bda672dcc03c9f203a1928848bc553 /src/game/MapManager.cpp | |
parent | 13fc3dcd7e95288cd9482e7440df3b15a3c580cb (diff) | |
parent | b49732c04db0d5bf67bf78e73e9c22f2078fd47c (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r-- | src/game/MapManager.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index df8521be7d0..b2856b1fb1f 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -210,14 +210,12 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player) } } - // TODO: move this to a map dependent location - /*if(i_data && i_data->IsEncounterInProgress()) - { - sLog.outDebug("MAP: Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName()); - player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT); - return(false); - }*/ - return true; + // Requirements + InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid); + if(!instance) + return false; + + return player->Satisfy(objmgr.GetAccessRequirement(instance->access_id), mapid, true); } else return true; |