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:
@@ -2959,6 +2959,11 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (player->GetSession()->PlayerLoading() && playerBind && playerBind->save != mapSave)
|
||||||
|
{
|
||||||
|
// Prevent "Convert to Raid" exploit to reset instances
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
playerBind = sInstanceSaveMgr->PlayerBindToInstance(player->GetGUID(), mapSave, false, player);
|
playerBind = sInstanceSaveMgr->PlayerBindToInstance(player->GetGUID(), mapSave, false, player);
|
||||||
|
|||||||
@@ -665,11 +665,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 (_player->GetMap()->IsDungeon() || _player->GetMap()->IsRaidOrHeroicDungeon())
|
||||||
|
{
|
||||||
|
Map::PlayerList const &playerList = _player->GetMap()->GetPlayers();
|
||||||
if (playerList.IsEmpty())
|
if (playerList.IsEmpty())
|
||||||
_player->TeleportToEntryPoint();
|
_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