From e9ad6f7913ed1e6fe1023cda3f9c04c0c6b4de2b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 21 Nov 2008 04:41:39 +0000 Subject: [PATCH] Plumb in the list if user IDs to the land module to allow selection of objects by owner name --- OpenSim/Framework/IClientAPI.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 +++++++++- OpenSim/Region/Environment/Interfaces/ILandObject.cs | 2 +- .../Modules/World/Land/LandManagementModule.cs | 4 ++-- .../Environment/Modules/World/Land/LandObject.cs | 8 ++++---- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 7531517071..b32c7f6458 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -174,7 +174,7 @@ namespace OpenSim.Framework public delegate void ParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client); - public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client); + public delegate void ParcelSelectObjects(int land_local_id, int request_type, List returnIDs, IClientAPI remote_client); public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 25927b6c6c..b11a5e8414 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5713,12 +5713,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP case PacketType.ParcelSelectObjects: ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; + List returnIDs = new List(); + + foreach(ParcelSelectObjectsPacket.ReturnIDsBlock rb in + selectPacket.ReturnIDs) + { + returnIDs.Add(rb.ReturnID); + } + handlerParcelSelectObjects = OnParcelSelectObjects; if (handlerParcelSelectObjects != null) { handlerParcelSelectObjects(selectPacket.ParcelData.LocalID, - Convert.ToInt32(selectPacket.ParcelData.ReturnType), this); + Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this); } break; case PacketType.ParcelObjectOwnersRequest: diff --git a/OpenSim/Region/Environment/Interfaces/ILandObject.cs b/OpenSim/Region/Environment/Interfaces/ILandObject.cs index 85da000eb7..9d51109c0a 100644 --- a/OpenSim/Region/Environment/Interfaces/ILandObject.cs +++ b/OpenSim/Region/Environment/Interfaces/ILandObject.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Interfaces bool[,] getSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); bool[,] modifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); bool[,] mergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); - void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client); + void sendForceObjectSelect(int local_id, int request_type, List returnIDs, IClientAPI remote_client); void sendLandObjectOwners(IClientAPI remote_client); void returnObject(SceneObjectGroup obj); void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client); diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index 89dde269f7..f656fb6c0a 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs @@ -976,9 +976,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land join(west, south, east, north, remote_client.AgentId); } - public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) + public void handleParcelSelectObjectsRequest(int local_id, int request_type, List returnIDs, IClientAPI remote_client) { - m_landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); + m_landList[local_id].sendForceObjectSelect(local_id, request_type, returnIDs, remote_client); } public void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client) diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 197d5c236c..be806c277f 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -645,7 +645,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land #region Object Select and Object Owner Listing - public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) + public void sendForceObjectSelect(int local_id, int request_type, List returnIDs, IClientAPI remote_client) { if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) { @@ -662,9 +662,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land { resultLocalIDs.Add(obj.LocalId); } - // else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && ...) // TODO: group support - // { - // } + else if (request_type == LandChannel.LAND_SELECT_OBJECTS_GROUP && obj.GroupID == landData.GroupID && landData.GroupID != UUID.Zero) + { + } else if (request_type == LandChannel.LAND_SELECT_OBJECTS_OTHER && obj.OwnerID != remote_client.AgentId) {