fix(Core/Instance): Fix instance resetting exploit (#2172)

* fix(Core/Instance): Fix instance resetting exploit

- Fix issue with instance reset exploit

Co-Authored-By: Lee <talamortis@users.noreply.github.com>

* Added another check

Added a check to see if any players are in the current instance before teleporting the player to the entrance.
This commit is contained in:
Poszer
2019-08-06 16:06:44 +02:00
committed by GitHub
parent d40e894618
commit ef377b9d9f

View File

@@ -566,6 +566,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())
if (playerList.isEmpty())
_player->TeleportToEntryPoint();
}
//! Broadcast a logout message to the player's friends