From 3965fa2ff3fd59dd5bb049b1321468380cf2af2d Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 24 May 2008 09:40:14 +0000 Subject: * Implements selected object return. * If user is in the same sim with you, they'll get an inventory update, if not.... oh well, they'll have to clear their cache potentially before they'll see it. --- .../Environment/Modules/World/Land/LandObject.cs | 70 ++++++++++++++-------- 1 file changed, 45 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 54870d8..98f3a3a 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -596,23 +596,32 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) { List resultLocalIDs = new List(); - foreach (SceneObjectGroup obj in primsOverMe) + try { - if (obj.LocalId > 0) + lock (primsOverMe) { - if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID) - { - resultLocalIDs.Add(obj.LocalId); - } - // else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && ...) // TODO: group support - // { - // } - else if (request_type == LandChannel.LAND_SELECT_OBJECTS_OTHER && - obj.OwnerID != remote_client.AgentId) + foreach (SceneObjectGroup obj in primsOverMe) { - resultLocalIDs.Add(obj.LocalId); + if (obj.LocalId > 0) + { + if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID) + { + resultLocalIDs.Add(obj.LocalId); + } + // else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && ...) // TODO: group support + // { + // } + else if (request_type == LandChannel.LAND_SELECT_OBJECTS_OTHER && + obj.OwnerID != remote_client.AgentId) + { + resultLocalIDs.Add(obj.LocalId); + } + } } } + } catch (InvalidOperationException) + { + m_log.Error("[LAND]: Unable to force select the parcel objects. Arr."); } remote_client.sendForceClientSelectObjects(resultLocalIDs); @@ -633,26 +642,37 @@ namespace OpenSim.Region.Environment.Modules.World.Land { Dictionary primCount = new Dictionary(); - foreach (SceneObjectGroup obj in primsOverMe) + lock (primsOverMe) { try { - if (!primCount.ContainsKey(obj.OwnerID)) + + foreach (SceneObjectGroup obj in primsOverMe) { - primCount.Add(obj.OwnerID, 0); + try + { + if (!primCount.ContainsKey(obj.OwnerID)) + { + primCount.Add(obj.OwnerID, 0); + } + } + catch (NullReferenceException) + { + m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); + } + try + { + primCount[obj.OwnerID] += obj.PrimCount; + } + catch (KeyNotFoundException) + { + m_log.Error("[LAND]: Unable to match a prim with it's owner."); + } } } - catch (NullReferenceException) - { - m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); - } - try - { - primCount[obj.OwnerID] += obj.PrimCount; - } - catch (KeyNotFoundException) + catch (InvalidOperationException) { - m_log.Error("[LAND]: Unable to match a prim with it's owner."); + m_log.Error("[LAND]: Unable to Enumerate Land object arr."); } } -- cgit v1.1