fix(Core/Maps): display instance warning when entering bound dungeon (#7448)

This commit is contained in:
UltraNix
2021-08-25 11:41:43 +02:00
committed by GitHub
parent 2c9ff47e80
commit 1fd963b246

View File

@@ -2774,7 +2774,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
if (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance())
player->AddInstanceEnterTime(GetInstanceId(), time(nullptr));
if (!playerBind->perm && !mapSave->CanReset() && (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance()))
if (playerBind->perm && !mapSave->CanReset() && group && !group->isLFGGroup() && !group->IsLfgRandomInstance())
{
WorldPacket data(SMSG_INSTANCE_LOCK_WARNING_QUERY, 9);
data << uint32(60000);
@@ -2814,6 +2814,7 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
//if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
// m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
Map::RemovePlayerFromMap(player, remove);
player->SetPendingBind(0, 0);
}
void InstanceMap::AfterPlayerUnlinkFromMap()