From bc17b34ab7752ea8bd69073dd7b28726ca8847fa Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 29 Nov 2021 14:50:15 -0500 Subject: [PATCH] Check player conditions to enter instance Port From (https://github.com/TrinityCore/TrinityCore/commit/70cd58765e2e78a691de6b2adf82418bd1e208f8) --- Source/Game/Maps/MapManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Game/Maps/MapManager.cs b/Source/Game/Maps/MapManager.cs index bca11f417..cf445d417 100644 --- a/Source/Game/Maps/MapManager.cs +++ b/Source/Game/Maps/MapManager.cs @@ -154,6 +154,10 @@ namespace Game.Entities if (player.IsGameMaster()) return EnterState.CanEnter; + //Other requirements + if (!player.Satisfy(Global.ObjectMgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true)) + return EnterState.CannotEnterUnspecifiedReason; + string mapName = entry.MapName[Global.WorldMgr.GetDefaultDbcLocale()]; Group group = player.GetGroup(); @@ -213,11 +217,7 @@ namespace Game.Entities return EnterState.CannotEnterTooManyInstances; } - //Other requirements - if (player.Satisfy(Global.ObjectMgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true)) - return EnterState.CanEnter; - else - return EnterState.CannotEnterUnspecifiedReason; + return EnterState.CanEnter; } public void Update(uint diff)