From 7306b73f02231687577425cb2e905c51bfbfdfc1 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 15 Apr 2009 21:07:09 +0000
Subject: Commit the group deeding support, thank you, mcortez
---
OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 1 +
OpenSim/Framework/IClientAPI.cs | 3 +++
.../Region/ClientStack/LindenUDP/LLClientView.cs | 28 +++++++++++++++++++++-
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 1 +
.../Region/Framework/Interfaces/IGroupsModule.cs | 9 +++++++
.../Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 +
OpenSim/Tests/Common/Mock/TestClient.cs | 1 +
7 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index d7afb4e..04b9c38 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -668,6 +668,7 @@ namespace OpenSim.Client.MXP.ClientStack
public event ParcelGodForceOwner OnParcelGodForceOwner;
public event ParcelReclaim OnParcelReclaim;
public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
public event FriendActionDelegate OnApproveFriendRequest;
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 064e965..27cf44f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -192,6 +192,8 @@ namespace OpenSim.Framework
public delegate void ParcelReturnObjectsRequest(
int local_id, uint return_type, UUID[] agent_ids, UUID[] selected_ids, IClientAPI remote_client);
+ public delegate void ParcelDeedToGroup( int local_id, UUID group_id, IClientAPI remote_client);
+
public delegate void EstateOwnerMessageRequest(
UUID AgentID, UUID SessionID, UUID TransactionID, UUID Invoice, byte[] Method, byte[][] Parameters,
IClientAPI remote_client);
@@ -673,6 +675,7 @@ namespace OpenSim.Framework
event ParcelGodForceOwner OnParcelGodForceOwner;
event ParcelReclaim OnParcelReclaim;
event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
+ event ParcelDeedToGroup OnParcelDeedToGroup;
event RegionInfoRequest OnRegionInfoRequest;
event EstateCovenantRequest OnEstateCovenantRequest;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7340628..b506434 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -260,6 +260,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private UUIDNameRequest handlerUUIDGroupNameRequest;
+ private ParcelDeedToGroup handlerParcelDeedToGroup;
+
private RequestObjectPropertiesFamily handlerObjectGroupRequest;
private ScriptReset handlerScriptReset;
private GetScriptRunning handlerGetScriptRunning;
@@ -1014,6 +1016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ParcelGodForceOwner OnParcelGodForceOwner;
public event ParcelReclaim OnParcelReclaim;
public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
public event FriendActionDelegate OnApproveFriendRequest;
@@ -3441,7 +3444,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock();
dataBlock[num].Count = ownersAndCount[owner];
- dataBlock[num].IsGroupOwned = false; //TODO: fix me when group support is added
+
+ if (m_GroupsModule != null)
+ {
+ //TODO: There's probably a better way to do this.
+ GroupProfileData gpd;
+ dataBlock[num].IsGroupOwned = m_GroupsModule.GetGroupProfile(owner, out gpd);
+ }
dataBlock[num].OnlineStatus = true; //TODO: fix me later
dataBlock[num].OwnerID = owner;
@@ -8596,6 +8605,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
break;
+
+
+ case PacketType.ParcelDeedToGroup:
+ ParcelDeedToGroupPacket parcelDeedToGroup = (ParcelDeedToGroupPacket)Pack;
+ if (m_GroupsModule != null)
+ {
+ handlerParcelDeedToGroup = OnParcelDeedToGroup;
+ if (handlerParcelDeedToGroup != null)
+ {
+ handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID,this);
+
+ }
+ }
+
+ break;
+
+
case PacketType.GroupNoticesListRequest:
GroupNoticesListRequestPacket groupNoticesListRequest =
(GroupNoticesListRequestPacket)Pack;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index a6e55f4..0e9d255 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -166,6 +166,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event ObjectDeselect OnObjectDeselect;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
index dad08ba..85b8cac 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
@@ -64,5 +64,14 @@ namespace OpenSim.Region.Framework.Interfaces
void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
+
+
+ ///
+ /// Retrieve group profile.
+ ///
+ ///
+ ///
+ /// False if group does not exist
+ bool GetGroupProfile(UUID GroupID, out GroupProfileData GroupProfile);
}
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 8b733cd..aff26b6 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -270,6 +270,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event ObjectDeselect OnObjectDeselect;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 0f75d70..15e92da 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -177,6 +177,7 @@ namespace OpenSim.Tests.Common.Mock
public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
public event ParcelSelectObjects OnParcelSelectObjects;
public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
+ public event ParcelDeedToGroup OnParcelDeedToGroup;
public event ObjectDeselect OnObjectDeselect;
public event RegionInfoRequest OnRegionInfoRequest;
public event EstateCovenantRequest OnEstateCovenantRequest;
--
cgit v1.1