aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapManager.cpp
diff options
context:
space:
mode:
authorJozef DĂșc <D0d0@users.noreply.github.com>2019-03-17 19:52:46 +0100
committerShauren <shauren.trinity@gmail.com>2021-11-24 22:25:12 +0100
commit70cd58765e2e78a691de6b2adf82418bd1e208f8 (patch)
tree384cc2f657435c72169d7405a6947098ba703f37 /src/server/game/Maps/MapManager.cpp
parent1c5f281a56ab48f14c125771e958c3ac673a0e4c (diff)
Check player conditions to enter instance (#23117)
Check player conditions to enter before party condition. (cherry picked from commit 62f621fcd7e03df62a2af1dc295dc7ec1fc28d77)
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rw-r--r--src/server/game/Maps/MapManager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 89136a72481..6b2e376b2dd 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -174,6 +174,10 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
if (player->IsGameMaster())
return Map::CAN_ENTER;
+ //Other requirements
+ if (!player->Satisfy(sObjectMgr->GetAccessRequirement(mapid, targetDifficulty), mapid, true))
+ return Map::CANNOT_ENTER_UNSPECIFIED_REASON;
+
char const* mapName = entry->MapName[sWorld->GetDefaultDbcLocale()];
Group* group = player->GetGroup();
@@ -227,11 +231,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
return Map::CANNOT_ENTER_TOO_MANY_INSTANCES;
}
- //Other requirements
- if (player->Satisfy(sObjectMgr->GetAccessRequirement(mapid, targetDifficulty), mapid, true))
- return Map::CAN_ENTER;
- else
- return Map::CANNOT_ENTER_UNSPECIFIED_REASON;
+ return Map::CAN_ENTER;
}
void MapManager::Update(uint32 diff)