mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Check player conditions to enter instance (#23117)
Check player conditions to enter before party condition.
This commit is contained in:
committed by
Giacomo Pozzoni
parent
c76931c2c0
commit
62f621fcd7
@@ -148,6 +148,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->name[player->GetSession()->GetSessionDbcLocale()];
|
||||
|
||||
Group* group = player->GetGroup();
|
||||
@@ -201,11 +205,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)
|
||||
|
||||
Reference in New Issue
Block a user