예제 #1
0
 /// <summary>Update role information</summary>
 /// <param name="role">Modified role to be updated</param>
 public void UpdateRole(GroupRole role)
 {
     OpenMetaverse.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket();
     gru.AgentData.AgentID = Client.Self.AgentID;
     gru.AgentData.SessionID = Client.Self.SessionID;
     gru.AgentData.GroupID = role.GroupID;
     gru.RoleData = new GroupRoleUpdatePacket.RoleDataBlock[1];
     gru.RoleData[0] = new GroupRoleUpdatePacket.RoleDataBlock();
     gru.RoleData[0].Name = Utils.StringToBytes(role.Name);
     gru.RoleData[0].Description = Utils.StringToBytes(role.Description);
     gru.RoleData[0].Powers = (ulong)role.Powers;
     gru.RoleData[0].RoleID = role.ID;
     gru.RoleData[0].Title = Utils.StringToBytes(role.Title);
     gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.UpdateAll;
     Client.Network.SendPacket(gru);
 }
예제 #2
0
 /// <summary>Create a new group role</summary>
 /// <param name="group">Group ID to update</param>
 /// <param name="role">Role to create</param>
 public void CreateRole(UUID group, GroupRole role)
 {
     OpenMetaverse.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket();
     gru.AgentData.AgentID = Network.AgentID;
     gru.AgentData.SessionID = Network.SessionID;
     gru.AgentData.GroupID = group;
     gru.RoleData = new GroupRoleUpdatePacket.RoleDataBlock[1];
     gru.RoleData[0].Name = Utils.StringToBytes(role.Name);
     gru.RoleData[0].Description = Utils.StringToBytes(role.Description);
     gru.RoleData[0].Powers = (ulong)role.Powers;
     gru.RoleData[0].Title = Utils.StringToBytes(role.Title);
     gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.Create;
     Network.SendPacket(gru);
 }
예제 #3
0
 /// <summary>Delete a group role</summary>
 /// <param name="group">Group ID to update</param>
 /// <param name="roleID">Role to delete</param>
 public void DeleteRole(UUID group, UUID roleID)
 {
     OpenMetaverse.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket();
     gru.AgentData.AgentID = Client.Self.AgentID;
     gru.AgentData.SessionID = Client.Self.SessionID;
     gru.AgentData.GroupID = group;
     gru.RoleData = new GroupRoleUpdatePacket.RoleDataBlock[1];
     gru.RoleData[0] = new GroupRoleUpdatePacket.RoleDataBlock();
     gru.RoleData[0].RoleID = roleID;
     gru.RoleData[0].Name = Utils.StringToBytes(string.Empty);
     gru.RoleData[0].Description = Utils.StringToBytes(string.Empty);
     gru.RoleData[0].Powers = 0u;
     gru.RoleData[0].Title = Utils.StringToBytes(string.Empty);
     gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.Delete;
     Client.Network.SendPacket(gru);
 }
예제 #4
0
 /// <summary>
 /// Create a new role
 /// </summary>
 /// <param name="group">Group to update</param>
 /// <param name="role">Role to create</param>
 public void CreateRole(LLUUID group, GroupRole role)
 {
     libsecondlife.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket();
     gru.AgentData.AgentID = Client.Self.AgentID;
     gru.AgentData.SessionID = Client.Self.SessionID;
     gru.AgentData.GroupID = group;
     gru.RoleData = new GroupRoleUpdatePacket.RoleDataBlock[1];
     gru.RoleData[0].Name = Helpers.StringToField(role.Name);
     gru.RoleData[0].Description = Helpers.StringToField(role.Description);
     gru.RoleData[0].Powers = (ulong)role.Powers;
     gru.RoleData[0].Title = Helpers.StringToField(role.Title);
     gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.Create;
     Client.Network.SendPacket(gru);
 }