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:
UltraNix
2021-08-07 16:10:07 +02:00
committed by GitHub
parent 418a3814fd
commit 5b057798e7
11 changed files with 89 additions and 43 deletions

View File

@@ -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);

View File

@@ -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