mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
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:
@@ -566,6 +566,12 @@ void WorldSession::LogoutPlayer(bool save)
|
|||||||
{
|
{
|
||||||
_player->GetGroup()->SendUpdate();
|
_player->GetGroup()->SendUpdate();
|
||||||
_player->GetGroup()->ResetMaxEnchantingLevel();
|
_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
|
//! Broadcast a logout message to the player's friends
|
||||||
|
|||||||
Reference in New Issue
Block a user