aboutsummaryrefslogtreecommitdiff
path: root/src/game/MapManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r--src/game/MapManager.cpp14
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;