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:169
Difficulty
Definition: DBCEnums.h:266
#define sMapMgr
Definition: MapMgr.h:219
#define sInstanceSaveMgr
Definition: InstanceSaveMgr.h:202
@ LANG_INSTANCE_RAID_GROUP_ONLY
Definition: Language.h:1053
#define sLFGMgr
Definition: LFGMgr.h:641
@ CONFIG_INSTANCE_IGNORE_RAID
Definition: IWorld.h:85
@ TRANSFER_ABORT_TOO_MANY_INSTANCES
Definition: Player.h:792
@ TRANSFER_ABORT_DIFFICULTY
Definition: Player.h:795
@ TRANSFER_ABORT_MAP_NOT_ALLOWED
Definition: Player.h:803
MapDifficulty const * GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty)
Definition: DBCStores.cpp:767
#define sScriptMgr
Definition: ScriptMgr.h:709
@ SMSG_CORPSE_NOT_IN_INSTANCE
Definition: Opcodes.h:1316
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
std::string const & GetName() const
Definition: Object.h:463
uint32 GetMapId() const
Definition: Position.h:275
Difficulty GetDifficulty(bool isRaid) const
Definition: Player.h:1920
bool HasCorpse() const
Definition: Player.h:2038
bool CheckInstanceCount(uint32 instanceId) const
Definition: PlayerStorage.cpp:6981
WorldSession * GetSession() const
Definition: Player.h:1998
WorldLocation GetCorpseLocation() const
Definition: Player.h:2039
Group * GetGroup()
Definition: Player.h:2468
bool IsGameMaster() const
Definition: Player.h:1175
bool Satisfy(DungeonProgressionRequirements const *ar, uint32 target_map, bool report=false)
Definition: PlayerStorage.cpp:6706
void SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 arg=0)
Definition: Player.cpp:11749
bool IsAlive() const
Definition: Unit.h:1654
bool isLFGGroup(bool restricted=false) const
Definition: Group.cpp:2261
bool IsLfgRandomInstance() const
Definition: Group.h:314
ObjectGuid GetGUID() const
Definition: Group.cpp:2302
bool isRaidGroup() const
Definition: Group.cpp:2267
Definition: InstanceSaveMgr.h:56
uint32 Parent
Definition: Map.h:273
EnterState
Definition: Map.h:421
@ CANNOT_ENTER_CORPSE_IN_DIFFERENT_INSTANCE
Definition: Map.h:428
@ CANNOT_ENTER_TOO_MANY_INSTANCES
Definition: Map.h:430
@ CAN_ENTER
Definition: Map.h:422
@ CANNOT_ENTER_UNSPECIFIED_REASON
Definition: Map.h:433
@ CANNOT_ENTER_NO_ENTRY
Definition: Map.h:424
@ CANNOT_ENTER_DIFFICULTY_UNAVAILABLE
Definition: Map.h:426
@ CANNOT_ENTER_UNINSTANCED_DUNGEON
Definition: Map.h:425
@ CANNOT_ENTER_NOT_IN_RAID
Definition: Map.h:427
Definition: WorldPacket.h:26
void SendAreaTriggerMessage(const char *Text,...) ATTR_PRINTF(2
Definition: MiscHandler.cpp:692
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:794
bool IsNonRaidDungeon() const
Definition: DBCStructure.h:1351
uint32 MapID
Definition: DBCStructure.h:1325
char const * name[16]
Definition: DBCStructure.h:1330
bool IsRaid() const
Definition: DBCStructure.h:1353
Definition: DBCStructure.h:2221