diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 06470b6..3198731 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -564,6 +564,8 @@ namespace OpenSim.Region.ClientStack | |||
564 | 564 | ||
565 | // Previously ClientView.API partial class | 565 | // Previously ClientView.API partial class |
566 | public event Action<IClientAPI> OnLogout; | 566 | public event Action<IClientAPI> OnLogout; |
567 | public event ObjectPermissions OnObjectPermissions; | ||
568 | |||
567 | public event Action<IClientAPI> OnConnectionClosed; | 569 | public event Action<IClientAPI> OnConnectionClosed; |
568 | public event ViewerEffectEventHandler OnViewerEffect; | 570 | public event ViewerEffectEventHandler OnViewerEffect; |
569 | public event ImprovedInstantMessage OnInstantMessage; | 571 | public event ImprovedInstantMessage OnInstantMessage; |
@@ -2919,7 +2921,35 @@ namespace OpenSim.Region.ClientStack | |||
2919 | } | 2921 | } |
2920 | break; | 2922 | break; |
2921 | case PacketType.ObjectPermissions: | 2923 | case PacketType.ObjectPermissions: |
2922 | // MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); | 2924 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); |
2925 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | ||
2926 | |||
2927 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = new List<ObjectPermissionsPacket.ObjectDataBlock>(); | ||
2928 | |||
2929 | for (int i = 0; i < newobjPerms.ObjectData.Length; i++) | ||
2930 | { | ||
2931 | permChanges.Add(newobjPerms.ObjectData[i]); | ||
2932 | } | ||
2933 | |||
2934 | // Here's our data, | ||
2935 | // PermField contains the field the info goes into | ||
2936 | // PermField determines which mask we're changing | ||
2937 | // | ||
2938 | // chmask is the mask of the change | ||
2939 | // setTF is whether we're adding it or taking it away | ||
2940 | // | ||
2941 | // objLocalID is the localID of the object. | ||
2942 | |||
2943 | // Unfortunately, we have to pass the event the packet because objData is an array | ||
2944 | // That means multiple object perms may be updated in a single packet. | ||
2945 | |||
2946 | LLUUID AgentID = newobjPerms.AgentData.AgentID; | ||
2947 | LLUUID SessionID = newobjPerms.AgentData.SessionID; | ||
2948 | if (OnObjectPermissions != null) | ||
2949 | { | ||
2950 | OnObjectPermissions(this, AgentID, SessionID, permChanges); | ||
2951 | } | ||
2952 | |||
2923 | break; | 2953 | break; |
2924 | 2954 | ||
2925 | case PacketType.RequestObjectPropertiesFamily: | 2955 | case PacketType.RequestObjectPropertiesFamily: |