diff options
author | megamage <none@none> | 2009-03-06 19:52:46 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-06 19:52:46 -0600 |
commit | f6ca5c601ef6089220fb0bfe3bc155fbbf3de812 (patch) | |
tree | b9598e93d132aea806527aa4de13046e3c80dc5d /src/game/MapManager.cpp | |
parent | dbb8c78394660c277f9056d899df8b0f9f1f8cb0 (diff) | |
parent | 4f6c96b98c5d5a065f902aa6106c928bf0b2a668 (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; |