From b7fcba0b862d2ffaa6fbfb5fc086048e360791ea Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 6 Apr 2007 11:08:21 +0000 Subject: [PATCH] Applying patch from issue 83, more additions (and a code cleanup) to GroupManager git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1106 52acb1d6-8a22-11de-b505-999d5b087335 --- libsecondlife/GroupManager.cs | 617 ++++++++++++++++++++-------------- 1 file changed, 366 insertions(+), 251 deletions(-) diff --git a/libsecondlife/GroupManager.cs b/libsecondlife/GroupManager.cs index ba948873..3dbee358 100644 --- a/libsecondlife/GroupManager.cs +++ b/libsecondlife/GroupManager.cs @@ -30,6 +30,8 @@ using libsecondlife.Packets; namespace libsecondlife { + #region Structs + /// /// Avatar group management /// @@ -193,6 +195,18 @@ namespace libsecondlife public int NumVotes; } + public struct GroupProposal + { + + public string VoteText; + + public int Quorum; + + public float Majority; + + public int Duration; + } + /// /// /// @@ -272,7 +286,7 @@ namespace libsecondlife /// /// A single transaction made by a group /// - public class Transaction + public struct Transaction { /// public string Time; @@ -286,12 +300,113 @@ namespace libsecondlife public int Amount; } + /// + /// Struct representing a group notice + /// + public struct GroupNotice + { + /// + public string Subject; + /// + public string Message; + /// + public LLUUID AttachmentID; + /// + public LLUUID OwnerID; + + /// + /// + /// + /// + public byte[] SerializeAttachment() + { + if (OwnerID == null || OwnerID == LLUUID.Zero || AttachmentID == null || AttachmentID == LLUUID.Zero) + return new byte[0]; + //I guess this is how this works, no gaurentees + string lsd = "" + AttachmentID.ToString() + "" + + OwnerID.ToString() + ""; + return Helpers.StringToField(lsd); + } + } + + #endregion Structs + + #region Enums + + /// + /// Role update flags + /// + public enum GroupRoleUpdate : uint + { + NoUpdate, + UpdateData, + UpdatePowers, + UpdateAll, + Create, + Delete + } + + /// + /// Group role powers flags + /// + [Flags] + public enum GroupRolePowers : long + { + None = 0, + Invite = 1 << 1, + Eject = 1 << 2, + ChangeOptions = 1 << 3, + CreateRole = 1 << 4, + DeleteRole = 1 << 5, + RoleProperties = 1 << 6, + AssignMemberLimited = 1 << 7, + AssignMember = 1 << 8, + RemoveMember = 1 << 9, + ChangeActions = 1 << 10, + ChangeIdentity = 1 << 11, + LandDeed = 1 << 12, + LandRelease = 1 << 13, + LandSetSale = 1 << 14, + LandDevideJoin = 1 << 15, + FindPlaces = 1 << 17, + LandChangeIdentity = 1 << 18, + SetLandingPoint = 1 << 19, + ChangeMedia = 1 << 20, + LandEdit = 1 << 21, + LandOptions = 1 << 22, + AllowEditLand = 1 << 23, + AllowFly = 1 << 24, + AllowRez = 1 << 25, + AllowLandmark = 1 << 26, + AllowSetHome = 1 << 28, + LandManageAllowed = 1 << 29, + LandManageBanned = 1 << 30, + LandManagePasses = 1 << 31, + LandEjectAndFreeze = 1 << 32, + ReturnGroupOwned = 1 << 48, + ReturnGroupSet = 1 << 33, + ReturnNonGroup = 1 << 34, + LandGardening = 1 << 35, + DeedObject = 1 << 36, + ObjectManipulate = 1 << 38, + ObjectSetForSale = 1 << 39, + Accountable = 1 << 40, + SendNotices = 1 << 42, + ReceiveNotices = 1 << 43, + StartProposal = 1 << 44, + VoteOnProposal = 1 << 45 + } + + #endregion Enums + /// /// Handles all network traffic related to reading and writing group /// information /// public class GroupManager { + #region Delegates + /// /// Callback for the list of groups the avatar is currently a member of /// @@ -338,6 +453,9 @@ namespace libsecondlife /// public delegate void GroupAccountTransactionsCallback(GroupAccountTransactions transactions); + #endregion Delegates + + #region Events /// public event CurrentGroupsCallback OnCurrentGroups; @@ -358,6 +476,8 @@ namespace libsecondlife /// //public event GroupAccountTransactionsCallback OnGroupAccountTransactions; + #endregion Events + private SecondLife Client; /// A list of all the lists of group members, indexed by the request ID @@ -428,11 +548,7 @@ namespace libsecondlife public void BeginGetGroupMembers(LLUUID group) { LLUUID requestID = LLUUID.Random(); - - lock (GroupMembersCaches) - { - GroupMembersCaches[requestID] = new Dictionary(); - } + lock (GroupMembersCaches) GroupMembersCaches[requestID] = new Dictionary(); GroupMembersRequestPacket request = new GroupMembersRequestPacket(); @@ -451,11 +567,7 @@ namespace libsecondlife public void BeginGetGroupRoles(LLUUID group) { LLUUID requestID = LLUUID.Random(); - - lock (GroupRolesCaches) - { - GroupRolesCaches[requestID] = new Dictionary(); - } + lock (GroupRolesCaches) GroupRolesCaches[requestID] = new Dictionary(); GroupRoleDataRequestPacket request = new GroupRoleDataRequestPacket(); @@ -467,6 +579,10 @@ namespace libsecondlife Client.Network.SendPacket(request); } + /// + /// + /// + /// public void BeginGetGroupRoleMembers(LLUUID group) { LLUUID requestID = LLUUID.Random(); @@ -501,6 +617,238 @@ namespace libsecondlife Client.Network.SendPacket(request); } + /// + /// Begin to get the group account summary + /// + /// The group's ID + /// How long of an interval + /// Which interval (0 for current, 1 for last) + public void BeginGetGroupAccountSummary(LLUUID group, int intervalDays, int currentInterval) + { + GroupAccountSummaryRequestPacket p = new GroupAccountSummaryRequestPacket(); + p.AgentData.AgentID = Client.Network.AgentID; + p.AgentData.SessionID = Client.Network.SessionID; + p.AgentData.GroupID = group; + p.MoneyData.RequestID = LLUUID.Random(); + p.MoneyData.CurrentInterval = currentInterval; + p.MoneyData.IntervalDays = intervalDays; + Client.Network.SendPacket(p); + } + + /// + /// Invites a user to a group + /// + /// The group to invite to. + /// A list of roles to invite a person to + /// Key of person to invite + public void Invite(LLUUID group, List roles, LLUUID personkey) + { + libsecondlife.Packets.InviteGroupRequestPacket igp = new libsecondlife.Packets.InviteGroupRequestPacket(); + igp.AgentData = new libsecondlife.Packets.InviteGroupRequestPacket.AgentDataBlock(); + igp.AgentData.AgentID = Client.Network.AgentID; + igp.AgentData.SessionID = Client.Network.SessionID; + igp.GroupData = new libsecondlife.Packets.InviteGroupRequestPacket.GroupDataBlock(); + igp.GroupData.GroupID = group; + List idbs = new List(); + foreach (LLUUID role in roles) + { + libsecondlife.Packets.InviteGroupRequestPacket.InviteDataBlock idb = new libsecondlife.Packets.InviteGroupRequestPacket.InviteDataBlock(); + idb.InviteeID = personkey; + idb.RoleID = role; + idbs.Add(idb); + } + igp.InviteData = idbs.ToArray(); + Client.Network.SendPacket(igp); + } + + /// + /// Create a new group. This method automaticaly deducts the group creation feild + /// + /// Group struct containing the new group info + public void CreateGroup(Group group) + { + libsecondlife.Packets.CreateGroupRequestPacket cgrp = new CreateGroupRequestPacket(); + //Fill in agent data + cgrp.AgentData = new CreateGroupRequestPacket.AgentDataBlock(); + cgrp.AgentData.AgentID = Client.Network.AgentID; + cgrp.AgentData.SessionID = Client.Network.SessionID; + //Fill in group data + cgrp.GroupData = new CreateGroupRequestPacket.GroupDataBlock(); + cgrp.GroupData.AllowPublish = group.AllowPublish; + cgrp.GroupData.Charter = Helpers.StringToField(group.Charter); + cgrp.GroupData.InsigniaID = group.InsigniaID; + cgrp.GroupData.MaturePublish = group.MaturePublish; + cgrp.GroupData.MembershipFee = group.MembershipFee; + cgrp.GroupData.Name = Helpers.StringToField(group.Name); + cgrp.GroupData.OpenEnrollment = group.OpenEnrollment; + cgrp.GroupData.ShowInList = group.ShowInList; + //Send it + Client.Network.SendPacket(cgrp); + } + + /// + /// Update a group's profile and other information + /// + /// Group struct to update + public void UpdateGroup(LLUUID id, Group group) + { + libsecondlife.Packets.UpdateGroupInfoPacket cgrp = new UpdateGroupInfoPacket(); + //Fill in agent data + cgrp.AgentData = new UpdateGroupInfoPacket.AgentDataBlock(); + cgrp.AgentData.AgentID = Client.Network.AgentID; + cgrp.AgentData.SessionID = Client.Network.SessionID; + //Fill in group data + cgrp.GroupData = new UpdateGroupInfoPacket.GroupDataBlock(); + cgrp.GroupData.GroupID = id; + cgrp.GroupData.AllowPublish = group.AllowPublish; + cgrp.GroupData.Charter = Helpers.StringToField(group.Charter); + cgrp.GroupData.InsigniaID = group.InsigniaID; + cgrp.GroupData.MaturePublish = group.MaturePublish; + cgrp.GroupData.MembershipFee = group.MembershipFee; + cgrp.GroupData.OpenEnrollment = group.OpenEnrollment; + cgrp.GroupData.ShowInList = group.ShowInList; + //Send it + Client.Network.SendPacket(cgrp); + } + + /// + /// Eject a user from a group + /// + /// Group to eject the user from + /// Avatar's key to eject + public void EjectUser(LLUUID group, LLUUID member) + { + libsecondlife.Packets.EjectGroupMemberRequestPacket eject = new EjectGroupMemberRequestPacket(); + eject.AgentData = new EjectGroupMemberRequestPacket.AgentDataBlock(); + eject.AgentData.AgentID = Client.Network.AgentID; + eject.AgentData.SessionID = Client.Network.SessionID; + //Group + eject.GroupData = new EjectGroupMemberRequestPacket.GroupDataBlock(); + eject.GroupData.GroupID = group; + //People to eject + eject.EjectData = new EjectGroupMemberRequestPacket.EjectDataBlock[1]; + eject.EjectData[0] = new EjectGroupMemberRequestPacket.EjectDataBlock(); + eject.EjectData[0].EjecteeID = member; + //send it + Client.Network.SendPacket(eject); + } + + /// + /// Update role information + /// + /// Group to update + /// Role to update + public void UpdateRole(LLUUID group, GroupRole role) + { + libsecondlife.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket(); + gru.AgentData.AgentID = Client.Network.AgentID; + gru.AgentData.SessionID = Client.Network.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 = role.Powers; + gru.RoleData[0].Title = Helpers.StringToField(role.Title); + gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.UpdateAll; + Client.Network.SendPacket(gru); + } + + /// + /// Create a new role + /// + /// Group to update + /// Role to create + public void CreateRole(LLUUID group, GroupRole role) + { + libsecondlife.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket(); + gru.AgentData.AgentID = Client.Network.AgentID; + gru.AgentData.SessionID = Client.Network.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 = role.Powers; + gru.RoleData[0].Title = Helpers.StringToField(role.Title); + gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.Create; + Client.Network.SendPacket(gru); + } + + /// + /// Remove an avatar from a role + /// + /// Group to update + /// Role to be removed from + /// Avatar to remove + public void RemoveFromRole(LLUUID group, LLUUID role, LLUUID member) + { + libsecondlife.Packets.GroupRoleChangesPacket grc = new GroupRoleChangesPacket(); + grc.AgentData.AgentID = Client.Network.AgentID; + grc.AgentData.SessionID = Client.Network.SessionID; + grc.AgentData.GroupID = group; + grc.RoleChange = new GroupRoleChangesPacket.RoleChangeBlock[1]; + grc.RoleChange[0] = new GroupRoleChangesPacket.RoleChangeBlock(); + //Add to members and role + grc.RoleChange[0].MemberID = member; + grc.RoleChange[0].RoleID = role; + //1 = Remove From Role + grc.RoleChange[0].Change = 1; + Client.Network.SendPacket(grc); + } + + /// + /// Assign an avatar to a role + /// + /// Group to update + /// Role to assign to + /// Avatar to assign + public void AddToRole(LLUUID group, LLUUID role, LLUUID member) + { + libsecondlife.Packets.GroupRoleChangesPacket grc = new GroupRoleChangesPacket(); + grc.AgentData.AgentID = Client.Network.AgentID; + grc.AgentData.SessionID = Client.Network.SessionID; + grc.AgentData.GroupID = group; + grc.RoleChange = new GroupRoleChangesPacket.RoleChangeBlock[1]; + grc.RoleChange[0] = new GroupRoleChangesPacket.RoleChangeBlock(); + //Add to members and role + grc.RoleChange[0].MemberID = member; + grc.RoleChange[0].RoleID = role; + //0 = Add to Role + grc.RoleChange[0].Change = 0; + Client.Network.SendPacket(grc); + } + + /// + /// + /// + /// + /// + public void SendGroupNotice(LLUUID group, GroupNotice notice) + { + Client.Self.InstantMessage(Client.ToString(), group, notice.Subject + "|" + notice.Message, + LLUUID.Zero, MainAvatar.InstantMessageDialog.GroupNotice, MainAvatar.InstantMessageOnline.Online, + LLVector3.Zero, LLUUID.Zero, notice.SerializeAttachment()); + } + + /// + /// Start a group proposal (vote) + /// + /// The group to send it to + /// The proposal to start + public void StartProposal(LLUUID group, GroupProposal prop) + { + StartGroupProposalPacket p = new StartGroupProposalPacket(); + p.AgentData.AgentID = Client.Network.AgentID; + p.AgentData.SessionID = Client.Network.SessionID; + p.ProposalData.GroupID = group; + p.ProposalData.ProposalText = Helpers.StringToField(prop.VoteText); + p.ProposalData.Quorum = prop.Quorum; + p.ProposalData.Majority = prop.Majority; + p.ProposalData.Duration = prop.Duration; + Client.Network.SendPacket(p); + } + + #region Packet Handlers + private void GroupDataHandler(Packet packet, Simulator simulator) { if (OnCurrentGroups != null) @@ -660,18 +1008,19 @@ namespace libsecondlife if (GroupRolesMembersCaches.ContainsKey(members.AgentData.RequestID)) { groupRoleMemberCache = GroupRolesMembersCaches[members.AgentData.RequestID]; - int i = 0; foreach (GroupRoleMembersReplyPacket.MemberDataBlock block in members.MemberData) { KeyValuePair rolemember = new KeyValuePair(block.RoleID, block.MemberID); - groupRoleMemberCache[i++] = rolemember; + groupRoleMemberCache.Add(rolemember); } } } - Console.WriteLine("ZOmg: " + groupRoleMemberCache.Count.ToString() + members.AgentData.TotalPairs.ToString()); + + Client.DebugLog("Pairs Ratio: " + groupRoleMemberCache.Count + "/" + members.AgentData.TotalPairs); + // Check if we've received all the pairs that are showing up if (OnGroupRolesMembers != null && groupRoleMemberCache != null && groupRoleMemberCache.Count >= members.AgentData.TotalPairs) { @@ -684,7 +1033,7 @@ namespace libsecondlife { //GroupActiveProposalItemReplyPacket proposal = (GroupActiveProposalItemReplyPacket)packet; - // TODO: Create a proposal class to represent the fields in a proposal item + // TODO: Create a proposal struct to represent the fields in a proposal item } private void GroupVoteHistoryItemHandler(Packet packet, Simulator simulator) @@ -768,241 +1117,7 @@ namespace libsecondlife // catch (Exception e) { Client.Log(e.ToString(), Helpers.LogLevel.Error); } //} } - /// - /// Invites a user to a group - /// - /// The group to invite to. - /// A list of roles to invite a person to - /// Key of person to invite - public void Invite(LLUUID group, List roles, LLUUID personkey) - { - libsecondlife.Packets.InviteGroupRequestPacket igp = new libsecondlife.Packets.InviteGroupRequestPacket(); - igp.AgentData = new libsecondlife.Packets.InviteGroupRequestPacket.AgentDataBlock(); - igp.AgentData.AgentID = Client.Network.AgentID; - igp.AgentData.SessionID = Client.Network.SessionID; - igp.GroupData = new libsecondlife.Packets.InviteGroupRequestPacket.GroupDataBlock(); - igp.GroupData.GroupID = group; - List idbs = new List(); - foreach (LLUUID role in roles) - { - libsecondlife.Packets.InviteGroupRequestPacket.InviteDataBlock idb = new libsecondlife.Packets.InviteGroupRequestPacket.InviteDataBlock(); - idb.InviteeID = personkey; - idb.RoleID = role; - idbs.Add(idb); - } - igp.InviteData = idbs.ToArray(); - Client.Network.SendPacket(igp); - } - /// - /// Create a new group. This method automaticaly deducts the group creation feild - /// - /// Group struct containing the new group info - public void CreateGroup(Group group) - { - libsecondlife.Packets.CreateGroupRequestPacket cgrp = new CreateGroupRequestPacket(); - //Fill in agent data - cgrp.AgentData = new CreateGroupRequestPacket.AgentDataBlock(); - cgrp.AgentData.AgentID = Client.Network.AgentID; - cgrp.AgentData.SessionID = Client.Network.SessionID; - //Fill in group data - cgrp.GroupData = new CreateGroupRequestPacket.GroupDataBlock(); - cgrp.GroupData.AllowPublish = group.AllowPublish; - cgrp.GroupData.Charter = Helpers.StringToField(group.Charter); - cgrp.GroupData.InsigniaID = group.InsigniaID; - cgrp.GroupData.MaturePublish = group.MaturePublish; - cgrp.GroupData.MembershipFee = group.MembershipFee; - cgrp.GroupData.Name = Helpers.StringToField(group.Name); - cgrp.GroupData.OpenEnrollment = group.OpenEnrollment; - cgrp.GroupData.ShowInList = group.ShowInList; - //Send it - Client.Network.SendPacket(cgrp); - } - /// - /// Update a group's profile and other information - /// - /// Group struct to update - public void UpdateGroup(Group group) - { - libsecondlife.Packets.UpdateGroupInfoPacket cgrp = new UpdateGroupInfoPacket(); - //Fill in agent data - cgrp.AgentData = new UpdateGroupInfoPacket.AgentDataBlock(); - cgrp.AgentData.AgentID = Client.Network.AgentID; - cgrp.AgentData.SessionID = Client.Network.SessionID; - //Fill in group data - cgrp.GroupData = new UpdateGroupInfoPacket.GroupDataBlock(); - cgrp.GroupData.AllowPublish = group.AllowPublish; - cgrp.GroupData.Charter = Helpers.StringToField(group.Charter); - cgrp.GroupData.InsigniaID = group.InsigniaID; - cgrp.GroupData.MaturePublish = group.MaturePublish; - cgrp.GroupData.MembershipFee = group.MembershipFee; - cgrp.GroupData.OpenEnrollment = group.OpenEnrollment; - cgrp.GroupData.ShowInList = group.ShowInList; - //Send it - Client.Network.SendPacket(cgrp); - } - /// - /// Eject a user from a group - /// - /// Group to eject the user from - /// Avatar's key to eject - public void EjectUser(LLUUID group, LLUUID member) - { - libsecondlife.Packets.EjectGroupMemberRequestPacket eject = new EjectGroupMemberRequestPacket(); - eject.AgentData = new EjectGroupMemberRequestPacket.AgentDataBlock(); - eject.AgentData.AgentID = Client.Network.AgentID; - eject.AgentData.SessionID = Client.Network.SessionID; - //Group - eject.GroupData = new EjectGroupMemberRequestPacket.GroupDataBlock(); - eject.GroupData.GroupID = group; - //People to eject - eject.EjectData = new EjectGroupMemberRequestPacket.EjectDataBlock[1]; - eject.EjectData[0] = new EjectGroupMemberRequestPacket.EjectDataBlock(); - eject.EjectData[0].EjecteeID = member; - //send it - Client.Network.SendPacket(eject); - } - /// - /// Update role information - /// - /// Group to update - /// Role to update - public void UpdateRole(LLUUID group, GroupRole role) - { - libsecondlife.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket(); - gru.AgentData.AgentID = Client.Network.AgentID; - gru.AgentData.SessionID = Client.Network.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 = role.Powers; - gru.RoleData[0].Title = Helpers.StringToField(role.Title); - gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.UpdateAll; - Client.Network.SendPacket(gru); - } - /// - /// Create a new role - /// - /// Group to update - /// Role to create - public void CreateRole(LLUUID group, GroupRole role) - { - libsecondlife.Packets.GroupRoleUpdatePacket gru = new GroupRoleUpdatePacket(); - gru.AgentData.AgentID = Client.Network.AgentID; - gru.AgentData.SessionID = Client.Network.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 = role.Powers; - gru.RoleData[0].Title = Helpers.StringToField(role.Title); - gru.RoleData[0].UpdateType = (byte)GroupRoleUpdate.Create; - Client.Network.SendPacket(gru); - } - /// - /// Remove an avatar from a role - /// - /// Group to update - /// Role to be removed from - /// Avatar to remove - public void RemoveFromRole(LLUUID group, LLUUID role, LLUUID member) - { - libsecondlife.Packets.GroupRoleChangesPacket grc = new GroupRoleChangesPacket(); - grc.AgentData.AgentID = Client.Network.AgentID; - grc.AgentData.SessionID = Client.Network.SessionID; - grc.AgentData.GroupID = group; - grc.RoleChange = new GroupRoleChangesPacket.RoleChangeBlock[1]; - grc.RoleChange[0] = new GroupRoleChangesPacket.RoleChangeBlock(); - //Add to members and role - grc.RoleChange[0].MemberID = member; - grc.RoleChange[0].RoleID = role; - //1 = Remove From Role - grc.RoleChange[0].Change = 1; - Client.Network.SendPacket(grc); - } - /// - /// Assign an avatar to a role - /// - /// Group to update - /// Role to assign to - /// Avatar to assign - public void AddToRole(LLUUID group, LLUUID role, LLUUID member) - { - libsecondlife.Packets.GroupRoleChangesPacket grc = new GroupRoleChangesPacket(); - grc.AgentData.AgentID = Client.Network.AgentID; - grc.AgentData.SessionID = Client.Network.SessionID; - grc.AgentData.GroupID = group; - grc.RoleChange = new GroupRoleChangesPacket.RoleChangeBlock[1]; - grc.RoleChange[0] = new GroupRoleChangesPacket.RoleChangeBlock(); - //Add to members and role - grc.RoleChange[0].MemberID = member; - grc.RoleChange[0].RoleID = role; - //0 = Add to Role - grc.RoleChange[0].Change = 0; - Client.Network.SendPacket(grc); - } - - /// - /// Role update flags - /// - public enum GroupRoleUpdate : uint - { - NoUpdate, - UpdateData, - UpdatePowers, - UpdateAll, - Create, - Delete - } - /// - /// Group role powers flags - /// - [Flags] - public enum GroupRolePowers : long - { - None = 0, - Invite = 1 << 1, - Eject = 1 << 2, - ChangeOptions = 1 << 3, - CreateRole = 1 << 4, - DeleteRole = 1 << 5, - RoleProperties = 1 << 6, - AssignMemberLimited = 1 << 7, - AssignMember = 1 << 8, - RemoveMember = 1 << 9, - ChangeActions = 1 << 10, - ChangeIdentity = 1 << 11, - LandDeed = 1 << 12, - LandRelease = 1 << 13, - LandSetSale = 1 << 14, - LandDevideJoin = 1 << 15, - FindPlaces = 1 << 17, - LandChangeIdentity = 1 << 18, - SetLandingPoint = 1 << 19, - ChangeMedia = 1 << 20, - LandEdit = 1 << 21, - LandOptions = 1 << 22, - AllowEditLand = 1 << 23, - AllowFly = 1 << 24, - AllowRez = 1 << 25, - AllowLandmark = 1 << 26, - AllowSetHome = 1 << 28, - LandManageAllowed = 1 << 29, - LandManageBanned = 1 << 30, - LandManagePasses = 1 << 31, - LandEjectAndFreeze = 1 << 32, - ReturnGroupOwned = 1 << 48, - ReturnGroupSet = 1 << 33, - ReturnNonGroup = 1 << 34, - LandGardening = 1 << 35, - DeedObject = 1 << 36, - ObjectManipulate = 1 << 38, - ObjectSetForSale = 1 << 39, - Accountable = 1 << 40, - SendNotices = 1 << 42, - ReceiveNotices = 1 << 43, - StartProposal = 1 << 44, - VoteOnProposal = 1 << 45 - } + + #endregion Packet Handlers } }