diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a897aa2..0b905df 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -317,8 +317,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
317 | get { return m_activeGroupPowers; } | 317 | get { return m_activeGroupPowers; } |
318 | } | 318 | } |
319 | 319 | ||
320 | public bool IsGroupMember(UUID groupID) | ||
321 | { | ||
322 | return m_groupPowers.ContainsKey(groupID); | ||
323 | } | ||
324 | |||
320 | public ulong GetGroupPowers(UUID groupID) | 325 | public ulong GetGroupPowers(UUID groupID) |
321 | { | 326 | { |
327 | if (groupID == m_activeGroupID) | ||
328 | return m_activeGroupPowers; | ||
329 | |||
322 | if (m_groupPowers.ContainsKey(groupID)) | 330 | if (m_groupPowers.ContainsKey(groupID)) |
323 | return m_groupPowers[groupID]; | 331 | return m_groupPowers[groupID]; |
324 | return 0; | 332 | return 0; |
@@ -750,6 +758,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
750 | m_clientPingTimer.Enabled = true; | 758 | m_clientPingTimer.Enabled = true; |
751 | 759 | ||
752 | m_scene.AddNewClient(this, true); | 760 | m_scene.AddNewClient(this, true); |
761 | |||
762 | RefreshGroupMembership(); | ||
753 | } | 763 | } |
754 | 764 | ||
755 | /// <summary> | 765 | /// <summary> |
@@ -7129,10 +7139,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7129 | 7139 | ||
7130 | public void SendGroupMembership(GroupMembershipData[] GroupMembership) | 7140 | public void SendGroupMembership(GroupMembershipData[] GroupMembership) |
7131 | { | 7141 | { |
7142 | m_groupPowers.Clear(); | ||
7143 | |||
7132 | AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket(); | 7144 | AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket(); |
7133 | AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length]; | 7145 | AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length]; |
7134 | for (int i = 0; i < GroupMembership.Length; i++) | 7146 | for (int i = 0; i < GroupMembership.Length; i++) |
7135 | { | 7147 | { |
7148 | m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers; | ||
7149 | |||
7136 | AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock(); | 7150 | AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock(); |
7137 | Group.AcceptNotices = GroupMembership[i].AcceptNotices; | 7151 | Group.AcceptNotices = GroupMembership[i].AcceptNotices; |
7138 | Group.Contribution = GroupMembership[i].Contribution; | 7152 | Group.Contribution = GroupMembership[i].Contribution; |
@@ -7850,5 +7864,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7850 | } | 7864 | } |
7851 | 7865 | ||
7852 | #endregion | 7866 | #endregion |
7867 | |||
7868 | private void RefreshGroupMembership() | ||
7869 | { | ||
7870 | if (m_GroupsModule != null) | ||
7871 | { | ||
7872 | GroupMembershipData[] GroupMembership = | ||
7873 | m_GroupsModule.GetMembershipData(AgentId); | ||
7874 | |||
7875 | m_groupPowers.Clear(); | ||
7876 | |||
7877 | for (int i = 0; i < GroupMembership.Length; i++) | ||
7878 | { | ||
7879 | m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers; | ||
7880 | } | ||
7881 | } | ||
7882 | } | ||
7853 | } | 7883 | } |
7854 | } | 7884 | } |