fix(Core): Instance Reset Exploit Fix (#12459)

* fix(Core): Fix Instance Reset Exploit

* Whitespace fix

* Remove unnecessary include

* Check player instance save IDs when adding to map

* Only compare playerBind during login
This commit is contained in:
ZhengPeiRu21
2022-07-24 11:37:42 -06:00
committed by GitHub
parent 33d0321a02
commit 631686be7e
2 changed files with 8 additions and 2 deletions

View File

@@ -665,11 +665,12 @@ void WorldSession::LogoutPlayer(bool save)
_player->GetGroup()->SendUpdate();
_player->GetGroup()->ResetMaxEnchantingLevel();
Map::PlayerList const& playerList = _player->GetMap()->GetPlayers();
if (_player->GetMap()->IsDungeon() || _player->GetMap()->IsRaidOrHeroicDungeon())
{
Map::PlayerList const &playerList = _player->GetMap()->GetPlayers();
if (playerList.IsEmpty())
_player->TeleportToEntryPoint();
}
}
//! Broadcast a logout message to the player's friends