mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
fix(Core/Maps): Enabled dead players to be resurrected at the dungeon entrance if cannot enter it due to some reasons (#7236)
- Closes #6790
This commit is contained in:
@@ -1435,10 +1435,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
|
||||
// Check enter rights before map getting to avoid creating instance copy for player
|
||||
// this check not dependent from map instance copy and same for all instance copies of selected map
|
||||
if (!(options & TELE_TO_GM_MODE) && !sMapMgr->CanPlayerEnter(mapid, this, false))
|
||||
if (!(options & TELE_TO_GM_MODE) && sMapMgr->PlayerCannotEnter(mapid, this, false))
|
||||
return false;
|
||||
|
||||
// if CanPlayerEnter -> CanEnter: checked above
|
||||
// if PlayerCannotEnter -> CanEnter: checked above
|
||||
{
|
||||
//lets reset near teleport flag if it wasn't reset during chained teleports
|
||||
SetSemaphoreTeleportNear(0);
|
||||
|
||||
@@ -6971,12 +6971,12 @@ bool Player::CheckInstanceLoginValid()
|
||||
return false;
|
||||
}
|
||||
|
||||
// pussywizard: check CanEnter for GetMap(), because in CanPlayerEnter it is called for a map decided before loading screen (can change)
|
||||
if (!GetMap()->CanEnter(this, true))
|
||||
// pussywizard: check CanEnter for GetMap(), because in PlayerCannotEnter it is called for a map decided before loading screen (can change)
|
||||
if (GetMap()->CannotEnter(this, true))
|
||||
return false;
|
||||
|
||||
// do checks for satisfy accessreqs, instance full, encounter in progress (raid), perm bind group != perm bind player
|
||||
return sMapMgr->CanPlayerEnter(GetMap()->GetId(), this, true);
|
||||
return sMapMgr->PlayerCannotEnter(GetMap()->GetId(), this, true) == Map::CAN_ENTER;
|
||||
}
|
||||
|
||||
bool Player::CheckInstanceCount(uint32 instanceId) const
|
||||
|
||||
Reference in New Issue
Block a user