141 Difficulty targetDifficulty, requestedDifficulty;
142 targetDifficulty = requestedDifficulty = player->GetDifficultyID(entry);
149 if (player->IsGameMaster())
154 Group* group = player->GetGroup();
159 if (!player->IsAlive())
161 if (player->HasCorpse())
164 uint32 corpseMap = player->GetCorpseLocation().GetMapId();
167 if (corpseMap == mapid)
171 corpseMap = corpseInstance ? corpseInstance->
Parent : 0;
177 TC_LOG_DEBUG(
"maps",
"MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
180 TC_LOG_DEBUG(
"maps",
"Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
184 if (!loginCheck && group)
187 if (boundInstance && boundInstance->
save)
194 if (entry->
IsDungeon() && (!player->GetGroup() || (player->GetGroup() && !player->GetGroup()->isLFGGroup())))
196 uint32 instanceIdToCheck = 0;
197 if (
InstanceSave* save = player->GetInstanceSave(mapid))
198 instanceIdToCheck = save->GetInstanceId();
201 if (!player->CheckInstanceCount(instanceIdToCheck) && !player->isDead())
206 if (player->Satisfy(
sObjectMgr->GetAccessRequirement(mapid, targetDifficulty), mapid,
true))
InstanceSave * save
Definition: Group.h:170
Difficulty
Definition: DBCEnums.h:402
bool isRaidGroup() const
Definition: Group.cpp:2509
Definition: DBCStructure.h:830
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
#define sWorld
Definition: World.h:887
#define sObjectMgr
Definition: ObjectMgr.h:1567
MapDifficultyEntry const * GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty)
Definition: DBCStores.cpp:737
static MapManager * instance()
Definition: MapManager.cpp:65
uint32 Parent
Definition: Map.h:224
uint32_t uint32
Definition: Define.h:150
bool IsDungeon() const
Definition: DBCStructure.h:857
uint32 ID
Definition: DBCStructure.h:832
Definition: InstanceSaveMgr.h:44
bool IsRaid() const
Definition: DBCStructure.h:860
Definition: DBCStructure.h:885
DBCStorage< MapEntry > sMapStore(Mapfmt)
#define sMapMgr
Definition: MapManager.h:194
EnterState
Definition: Map.h:371
char * MapName_lang
Definition: DBCStructure.h:838
InstanceGroupBind * GetBoundInstance(Player *player)
Definition: Group.cpp:2191
uint32 GetInstanceId() const
Definition: InstanceSaveMgr.h:64