From 4b85cbf0b6f31880655f07e68eb041247dedf870 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 16 Apr 2009 01:01:40 +0000 Subject: 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 96e382c..f42b842 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 b4c3796..da87183 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 2c57303..ab1816f 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 a19b454..2cf739b 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 3c41c02..34d2ca7 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 9f8fbb3..c721790 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 ff2e3ca..1efc3fd 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) { } -- cgit v1.1