当前位置: 首页>>代码示例>>C#>>正文


C# Framework.GroupMembershipData类代码示例

本文整理汇总了C#中OpenSim.Framework.GroupMembershipData的典型用法代码示例。如果您正苦于以下问题:C# GroupMembershipData类的具体用法?C# GroupMembershipData怎么用?C# GroupMembershipData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GroupMembershipData类属于OpenSim.Framework命名空间,在下文中一共展示了GroupMembershipData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendGroupMembership

        public void SendGroupMembership(GroupMembershipData[] GroupMembership)
        {

        }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:4,代码来源:MyNpcCharacter.cs

示例2: SendGroupMembershipInfoViaCaps

        /// <summary>
        /// Send 'remoteClient' the group membership 'data' for agent 'dataForAgentID'.
        /// </summary>
        private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data)
        {
            if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            OSDArray AgentData = new OSDArray(1);
            OSDMap AgentDataMap = new OSDMap(1);
            AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
            AgentData.Add(AgentDataMap);

            OSDArray GroupData = new OSDArray(data.Length);
            OSDArray NewGroupData = new OSDArray(data.Length);

            foreach (GroupMembershipData membership in data)
            {
                if (GetRequestingAgentID(remoteClient) != dataForAgentID)
                {
                    if (!membership.ListInProfile)
                    {
                        // If we're sending group info to remoteclient about another agent, 
                        // filter out groups the other agent doesn't want to share.
                        continue;
                    }
                }

                OSDMap GroupDataMap = new OSDMap(6);
                OSDMap NewGroupDataMap = new OSDMap(1);

                GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
                GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
                GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
                GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
                GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
                GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
                NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));

                GroupData.Add(GroupDataMap);
                NewGroupData.Add(NewGroupDataMap);
            }

            OSDMap llDataStruct = new OSDMap(3);
            llDataStruct.Add("AgentData", AgentData);
            llDataStruct.Add("GroupData", GroupData);
            llDataStruct.Add("NewGroupData", NewGroupData);

            if (m_debugEnabled)
            {
                m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct));
            }

            IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();

            if (queue != null)
            {
                queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient));
            }
            
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:60,代码来源:GroupsModule.cs

示例3: SendAvatarGroupsReply

 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
 {
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:3,代码来源:MyNpcCharacter.cs

示例4: GroupMembershipData

        public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
        {
            OSDArray AgentData = new OSDArray(1);
            OSDMap AgentDataMap = new OSDMap(1);
            AgentDataMap.Add("AgentID", OSD.FromUUID(receiverAgent));
            AgentData.Add(AgentDataMap);

            OSDArray GroupData = new OSDArray(data.Length);
            OSDArray NewGroupData = new OSDArray(data.Length);

            foreach (GroupMembershipData membership in data)
            {
                OSDMap GroupDataMap = new OSDMap(6);
                OSDMap NewGroupDataMap = new OSDMap(1);

                GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
                GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
                GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
                GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
                GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
                GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
                NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));

                GroupData.Add(GroupDataMap);
                NewGroupData.Add(NewGroupDataMap);
            }

            OSDMap llDataStruct = new OSDMap(3);
            llDataStruct.Add("AgentData", AgentData);
            llDataStruct.Add("GroupData", GroupData);
            llDataStruct.Add("NewGroupData", NewGroupData);

            return BuildEvent("AgentGroupDataUpdate", llDataStruct);

        }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:35,代码来源:EventQueueHelper.cs

示例5: OnNewClient

        private void OnNewClient(IClientAPI client)
        {
            // Subscribe to instant messages
            client.OnInstantMessage += OnInstantMessage;
            client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
            client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
            lock (m_ClientMap)
            {
                if (!m_ClientMap.ContainsKey(client.AgentId))
                {
                    m_ClientMap.Add(client.AgentId, client);
                }
            }

            GroupMembershipData[] updateGroups = new GroupMembershipData[1];
            updateGroups[0] = osGroup;

            client.SendGroupMembership(updateGroups);
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:19,代码来源:GroupsModule.cs

示例6: GroupMembershipData

 public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
 {
     AddEvent(receiverAgent, "AgentGroupDataUpdate", data);
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:4,代码来源:TestEventQueueGetModule.cs

示例7: GetAgentGroupMembership

        public GroupMembershipData GetAgentGroupMembership(UUID requestingAgentID, UUID agentID, UUID groupID)
        {
            if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR]  {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            GroupMembershipData data = new GroupMembershipData();

            ///////////////////////////////
            // Agent Specific Information:
            //
            OSDMap UserActiveGroup;
            if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup))
            {
                data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID);
            }

            OSDMap UserGroupMemberInfo;
            if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo))
            {
                data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
                data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
                data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean();
                data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID();

                ///////////////////////////////
                // Role Specific Information:
                //

                OSDMap GroupRoleInfo;
                if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo))
                {
                    data.GroupTitle = GroupRoleInfo["Title"].AsString();
                    data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
                }
            }

            ///////////////////////////////
            // Group Specific Information:
            //
            OSDMap GroupInfo;
            string GroupName;
            if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
            {
                data.GroupID = groupID;
                data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
                data.Charter = GroupInfo["Charter"].AsString();
                data.FounderID = GroupInfo["FounderID"].AsUUID();
                data.GroupName = GroupName;
                data.GroupPicture = GroupInfo["InsigniaID"].AsUUID();
                data.MaturePublish = GroupInfo["MaturePublish"].AsBoolean();
                data.MembershipFee = GroupInfo["MembershipFee"].AsInteger();
                data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean();
                data.ShowInList = GroupInfo["ShowInList"].AsBoolean();
            }

            return data;
        }
开发者ID:N3X15,项目名称:VoxelSim,代码行数:56,代码来源:SimianGroupsServicesConnectorModule.cs

示例8: SendAvatarGroupsReply

 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
 {
     throw new System.NotImplementedException();
 }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:4,代码来源:VWHClientView.cs

示例9: SendGroupMembership

 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
 {
     throw new System.NotImplementedException();
 }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:4,代码来源:VWHClientView.cs

示例10: SendGroupMembershipInfoViaCaps

        /// <summary>
        /// Send 'remoteClient' the group membership 'data' for agent 'dataForAgentID'.
        /// </summary>
        private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data)
        {
            if (m_debugEnabled) m_log.InfoFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            OSDArray AgentData = new OSDArray(1);
            OSDMap AgentDataMap = new OSDMap(1);
            AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
            AgentData.Add(AgentDataMap);


            OSDArray GroupData = new OSDArray(data.Length);
            OSDArray NewGroupData = new OSDArray(data.Length);

            foreach (GroupMembershipData membership in data)
            {
                OSDMap GroupDataMap = new OSDMap(6);
                OSDMap NewGroupDataMap = new OSDMap(1);

                GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
                GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
                GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
                GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
                GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
                GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
                NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));

                GroupData.Add(GroupDataMap);
                NewGroupData.Add(NewGroupDataMap);
            }

            OSDMap llDataStruct = new OSDMap(3);
            llDataStruct.Add("AgentData", AgentData);
            llDataStruct.Add("GroupData", GroupData);
            llDataStruct.Add("NewGroupData", NewGroupData);

            IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();

            if (queue != null)
            {
                queue.Enqueue(EventQueueHelper.BuildEvent("AgentGroupDataUpdate", llDataStruct), remoteClient.AgentId);
            }
            
        }
开发者ID:digitalmystic,项目名称:halcyon,代码行数:46,代码来源:FlexiGroupsModule.cs

示例11: MapGroupMembershipDataFromResult

        private OpenSim.Framework.GroupMembershipData MapGroupMembershipDataFromResult(Dictionary<string, string> groupResult, 
            Dictionary<string, string> powerResult)
        {
            // osgroup.GroupID, osgroup.Name as GroupName, osgroup.Charter, osgroup.InsigniaID, " +
            //"osgroup.FounderID, osgroup.MembershipFee, osgroup.OpenEnrollment, osgroup.ShowInList, " + 
            //"osgroup.AllowPublish, osgroup.MaturePublish, osgroupmembership.Contribution, " + 
            //"osgroupmembership.ListInProfile, osgroupmembership.AcceptNotices, osgroupmembership.SelectedRoleID, osrole.Title

            OpenSim.Framework.GroupMembershipData foundMembership = new OpenSim.Framework.GroupMembershipData();
            foundMembership.GroupID = new UUID(groupResult["GroupID"]);
            foundMembership.GroupName = groupResult["GroupName"];
            foundMembership.Charter = groupResult["Charter"];
            foundMembership.GroupPicture = new UUID(groupResult["InsigniaID"]);
            foundMembership.FounderID = new UUID(groupResult["FounderID"]);
            foundMembership.MembershipFee = Int32.Parse(groupResult["MembershipFee"]);
            foundMembership.OpenEnrollment = groupResult["OpenEnrollment"] == "0" ? false : true;
            foundMembership.ShowInList = groupResult["ShowInList"] == "0" ? false : true;
            foundMembership.AllowPublish = groupResult["AllowPublish"] == "0" ? false : true;
            foundMembership.MaturePublish = groupResult["MaturePublish"] == "0" ? false : true;
            foundMembership.Contribution = Int32.Parse(groupResult["Contribution"]);
            foundMembership.ListInProfile = groupResult["ListInProfile"] == "0" ? false : true;
            foundMembership.AcceptNotices = groupResult["AcceptNotices"] == "0" ? false : true;
            foundMembership.ActiveRole = new UUID(groupResult["SelectedRoleID"]);
            foundMembership.GroupTitle = groupResult["Title"];

            if (powerResult != null)
            {
                foundMembership.GroupPowers = ulong.Parse(powerResult["GroupPowers"]);
            }

            return foundMembership;
        }
开发者ID:digitalmystic,项目名称:halcyon,代码行数:32,代码来源:NativeGroupDataProvider.cs

示例12: UpdateGroupMembership

 public void UpdateGroupMembership(GroupMembershipData[] data)
 {
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:3,代码来源:NPCAvatar.cs

示例13: SendAgentGroupDataUpdate

 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
 {
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:3,代码来源:NPCAvatar.cs

示例14: GroupMembershipData

 public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
 {
     OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data);
     Enqueue(item, receiverAgent);
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:5,代码来源:EventQueueGetModule.cs

示例15: SendGroupMembershipInfoViaCaps

        /// <summary>
        /// Send 'remoteClient' the group membership 'data' for agent 'dataForAgentID'.
        /// </summary>
        private void SendGroupMembershipInfoViaCaps(IClientAPI remoteClient, UUID dataForAgentID, GroupMembershipData[] data)
        {
            if (m_debugEnabled) m_log.InfoFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            // NPCs currently don't have a CAPs structure or event queues.  There is a strong argument for conveying this information
            // to them anyway since it makes writing server-side bots a lot easier, but for now we don't do anything.
            if (remoteClient.SceneAgent.PresenceType == PresenceType.Npc)
                return;

            OSDArray AgentData = new OSDArray(1);
            OSDMap AgentDataMap = new OSDMap(1);
            AgentDataMap.Add("AgentID", OSD.FromUUID(dataForAgentID));
            AgentData.Add(AgentDataMap);

            OSDArray GroupData = new OSDArray(data.Length);
            OSDArray NewGroupData = new OSDArray(data.Length);

            foreach (GroupMembershipData membership in data)
            {
                if (GetRequestingAgentID(remoteClient) != dataForAgentID)
                {
                    if (!membership.ListInProfile)
                    {
                        // If we're sending group info to remoteclient about another agent, 
                        // filter out groups the other agent doesn't want to share.
                        continue;
                    }
                }

                OSDMap GroupDataMap = new OSDMap(6);
                OSDMap NewGroupDataMap = new OSDMap(1);

                GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
                GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
                GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
                GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
                GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
                GroupDataMap.Add("GroupName", OSD.FromString(membership.GroupName));
                NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(membership.ListInProfile));

                GroupData.Add(GroupDataMap);
                NewGroupData.Add(NewGroupDataMap);
            }

            OSDMap llDataStruct = new OSDMap(3);
            llDataStruct.Add("AgentData", AgentData);
            llDataStruct.Add("GroupData", GroupData);
            llDataStruct.Add("NewGroupData", NewGroupData);

            if (m_debugEnabled)
            {
                m_log.InfoFormat("[Groups]: {0}", OSDParser.SerializeJsonString(llDataStruct));
            }

            IEventQueue queue = remoteClient.Scene.RequestModuleInterface<IEventQueue>();

            if (queue != null)
            {
                queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient));
            }            
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:64,代码来源:GroupsModule.cs


注:本文中的OpenSim.Framework.GroupMembershipData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。