131{
133 if (!entry)
135
138
142
143 Difficulty targetDifficulty, requestedDifficulty;
145
147 if (!mapDiff)
148 {
151 }
152
153
156
158
161
164 {
165
167 {
168
171 LOG_DEBUG(
"maps",
"MAP: Player '{}' must be in a raid group to enter instance '{}'", player->
GetName(), mapName);
173 }
174 }
175
176
177 if (group)
179 if (!
sLFGMgr->inLfgDungeonMap(group->
GetGUID(), mapid, targetDifficulty))
180 {
183 }
184
186 {
188 {
189
191 do
192 {
193 if (corpseMap == mapid)
194 break;
195
197 corpseMap = corpseInstance ? corpseInstance->
Parent : 0;
198 } while (corpseMap);
199
200 if (!corpseMap)
201 {
204 LOG_DEBUG(
"maps",
"MAP: Player '{}' does not have a corpse in instance '{}' and cannot enter.", player->
GetName(), mapName);
206 }
207 LOG_DEBUG(
"maps",
"MAP: Player '{}' has corpse in instance '{}' and can enter.", player->
GetName(), mapName);
208 }
209 else
210 {
211 LOG_DEBUG(
"maps",
"Map::PlayerCannotEnter - player '{}' is dead but does not have a corpse!", player->
GetName());
212 }
213 }
214
215
216 if (!loginCheck)
217 {
219 if (destInstId)
220 if (
Map* boundMap =
sMapMgr->FindMap(mapid, destInstId))
221 if (
Map::EnterState denyReason = boundMap->CannotEnter(player, loginCheck))
222 return denyReason;
223 }
224
225
227 {
228 uint32 instaceIdToCheck = 0;
230 instaceIdToCheck = save->GetInstanceId();
231
232
234 {
237 }
238 }
239
240
242}
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:168
#define sScriptMgr
Definition: ScriptMgr.h:708
#define sInstanceSaveMgr
Definition: InstanceSaveMgr.h:202
#define sMapMgr
Definition: MapMgr.h:221
#define sLFGMgr
Definition: LFGMgr.h:641
MapDifficulty const * GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty)
Definition: DBCStores.cpp:767
@ CONFIG_INSTANCE_IGNORE_RAID
Definition: IWorld.h:90
@ LANG_INSTANCE_RAID_GROUP_ONLY
Definition: Language.h:1053
@ TRANSFER_ABORT_TOO_MANY_INSTANCES
Definition: Player.h:787
@ TRANSFER_ABORT_DIFFICULTY
Definition: Player.h:790
@ TRANSFER_ABORT_MAP_NOT_ALLOWED
Definition: Player.h:798
Difficulty
Definition: DBCEnums.h:266
@ SMSG_CORPSE_NOT_IN_INSTANCE
Definition: Opcodes.h:1316
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
std::string const & GetName() const
Definition: Object.h:458
uint32 GetMapId() const
Definition: Position.h:276
Difficulty GetDifficulty(bool isRaid) const
Definition: Player.h:1900
bool HasCorpse() const
Definition: Player.h:2018
bool CheckInstanceCount(uint32 instanceId) const
Definition: PlayerStorage.cpp:6986
WorldSession * GetSession() const
Definition: Player.h:1978
WorldLocation GetCorpseLocation() const
Definition: Player.h:2019
Group * GetGroup()
Definition: Player.h:2448
bool IsGameMaster() const
Definition: Player.h:1158
bool Satisfy(DungeonProgressionRequirements const *ar, uint32 target_map, bool report=false)
Definition: PlayerStorage.cpp:6711
void SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 arg=0)
Definition: Player.cpp:11713
bool IsAlive() const
Definition: Unit.h:1204
bool isLFGGroup(bool restricted=false) const
Definition: Group.cpp:2265
bool IsLfgRandomInstance() const
Definition: Group.h:314
ObjectGuid GetGUID() const
Definition: Group.cpp:2306
bool isRaidGroup() const
Definition: Group.cpp:2271
Definition: InstanceSaveMgr.h:56
uint32 Parent
Definition: Map.h:275
EnterState
Definition: Map.h:423
@ CANNOT_ENTER_CORPSE_IN_DIFFERENT_INSTANCE
Definition: Map.h:430
@ CANNOT_ENTER_TOO_MANY_INSTANCES
Definition: Map.h:432
@ CAN_ENTER
Definition: Map.h:424
@ CANNOT_ENTER_UNSPECIFIED_REASON
Definition: Map.h:435
@ CANNOT_ENTER_NO_ENTRY
Definition: Map.h:426
@ CANNOT_ENTER_DIFFICULTY_UNAVAILABLE
Definition: Map.h:428
@ CANNOT_ENTER_UNINSTANCED_DUNGEON
Definition: Map.h:427
@ CANNOT_ENTER_NOT_IN_RAID
Definition: Map.h:429
Definition: WorldPacket.h:27
void SendAreaTriggerMessage(const char *Text,...) ATTR_PRINTF(2
Definition: MiscHandler.cpp:691
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
Definition: WorldSession.cpp:214
LocaleConstant GetSessionDbcLocale() const
Definition: WorldSession.h:497
char const * GetAcoreString(uint32 entry) const
Definition: WorldSession.cpp:790
bool IsNonRaidDungeon() const
Definition: DBCStructure.h:1352
uint32 MapID
Definition: DBCStructure.h:1326
char const * name[16]
Definition: DBCStructure.h:1331
bool IsRaid() const
Definition: DBCStructure.h:1354
Definition: DBCStructure.h:2222