From 4b85cbf0b6f31880655f07e68eb041247dedf870 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 16 Apr 2009 01:01:40 +0000 Subject: [PATCH] Correctly flag group owned prims in the land prim list --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 2 +- OpenSim/Framework/IClientAPI.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 ++-- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 5 ++++- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 +- OpenSim/Tests/Common/Mock/TestClient.cs | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 96e382c0e0..f42b8429d3 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -1228,7 +1228,7 @@ namespace OpenSim.Client.MXP.ClientStack // Need to translate to MXP somehow } - public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount) + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { // Need to translate to MXP somehow } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index b4c37969ec..da8718358a 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -996,7 +996,7 @@ namespace OpenSim.Framework void SendLandAccessListData(List avatars, uint accessFlag, int localLandID); void SendForceClientSelectObjects(List objectIDs); - void SendLandObjectOwners(LandData land, Dictionary ownersAndCount); + void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount); void SendLandParcelOverlay(byte[] data, int sequence_id); #region Parcel Methods diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2c57303642..ab1816f2b0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3420,7 +3420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount) + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { int notifyCount = ownersAndCount.Count; ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); @@ -3445,7 +3445,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); dataBlock[num].Count = ownersAndCount[owner]; - if (land.GroupID == owner) + if (land.GroupID == owner || groups.Contains(owner)) dataBlock[num].IsGroupOwned = true; dataBlock[num].OnlineStatus = true; //TODO: fix me later diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index a19b45489e..2cf739b624 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -699,6 +699,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (m_scene.Permissions.CanEditParcel(remote_client.AgentId, this)) { Dictionary primCount = new Dictionary(); + List groups = new List(); lock (primsOverMe) { @@ -726,6 +727,8 @@ namespace OpenSim.Region.CoreModules.World.Land { m_log.Error("[LAND]: Unable to match a prim with it's owner."); } + if (obj.OwnerID == obj.GroupID && (!groups.Contains(obj.OwnerID))) + groups.Add(obj.OwnerID); } } catch (InvalidOperationException) @@ -734,7 +737,7 @@ namespace OpenSim.Region.CoreModules.World.Land } } - remote_client.SendLandObjectOwners(landData, primCount); + remote_client.SendLandObjectOwners(landData, groups, primCount); } } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 3c41c02235..34d2ca72cb 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -885,7 +885,7 @@ namespace OpenSim.Region.Examples.SimpleModule { } - public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount) + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 9f8fbb3989..c72179043e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -892,7 +892,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendForceClientSelectObjects(List objectIDs) { } - public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount) + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { } public void SendLandParcelOverlay(byte[] data, int sequence_id) diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index ff2e3ca255..1efc3fd2e3 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -929,7 +929,7 @@ namespace OpenSim.Tests.Common.Mock { } - public void SendLandObjectOwners(LandData land, Dictionary ownersAndCount) + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { }