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


C# IClientAPI.SendAgentDataUpdate方法代码示例

本文整理汇总了C#中IClientAPI.SendAgentDataUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendAgentDataUpdate方法的具体用法?C# IClientAPI.SendAgentDataUpdate怎么用?C# IClientAPI.SendAgentDataUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IClientAPI的用法示例。


在下文中一共展示了IClientAPI.SendAgentDataUpdate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendAgentDataUpdate

        private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
        {
            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
            UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID);
            string firstname, lastname;
            if (account != null)
            {
                firstname = account.FirstName;
                lastname = account.LastName;
            }
            else
            {
                firstname = "Unknown";
                lastname = "Unknown";
            }

            remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
                    lastname, activeGroupPowers, activeGroupName,
                    activeGroupTitle);
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:22,代码来源:GroupsModule.cs

示例2: SendAgentDataUpdate

        private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
        {
            if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
            string firstname = "Unknown", lastname = "Unknown";
            string name = m_UserManagement.GetUserName(dataForAgentID);
            if (!string.IsNullOrEmpty(name))
            {
                string[] parts = name.Split(new char[] { ' ' });
                if (parts.Length >= 2)
                {
                    firstname = parts[0];
                    lastname = parts[1];
                }
            }
            
            remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
                    lastname, activeGroupPowers, activeGroupName,
                    activeGroupTitle);
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:21,代码来源:GroupsModule.cs

示例3: SendAgentDataUpdate

        private void SendAgentDataUpdate(IClientAPI remoteClient, UUID dataForAgentID, UUID activeGroupID, string activeGroupName, ulong activeGroupPowers, string activeGroupTitle)
        {
            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
            
            remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, remoteClient.FirstName,
                    remoteClient.LastName, activeGroupPowers, activeGroupName,
                    activeGroupTitle);
        }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:10,代码来源:GroupsModule.cs

示例4: OnAgentDataUpdateRequest

        private void OnAgentDataUpdateRequest(IClientAPI remoteClient,
                                              UUID AgentID, UUID SessionID)
        {
            UUID ActiveGroupID;
            string ActiveGroupName;
            ulong ActiveGroupPowers;

            string firstname = remoteClient.FirstName;
            string lastname = remoteClient.LastName;

            string ActiveGroupTitle = "I IZ N0T";

            ActiveGroupID = osGroup.GroupID;
            ActiveGroupName = osGroup.GroupName;
            ActiveGroupPowers = osGroup.GroupPowers;

            remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname,
                                             lastname, ActiveGroupPowers, ActiveGroupName,
                                             ActiveGroupTitle);
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:20,代码来源:GroupsModule.cs

示例5: SendDataUpdate

         //tell remoteClient about its agent group info, and optionally send title to others
        private void SendDataUpdate(IClientAPI remoteClient, bool tellOthers)
        {
            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            UUID activeGroupID = UUID.Zero;
            string activeGroupTitle = string.Empty;
            string activeGroupName = string.Empty;
            ulong activeGroupPowers = (ulong)GroupPowers.None;

            UUID agentID = GetRequestingAgentID(remoteClient);
            GroupMembershipData membership = m_groupData.GetAgentActiveMembership(agentID.ToString(), agentID.ToString());
            if (membership != null)
            {
                activeGroupID = membership.GroupID;
                activeGroupTitle = membership.GroupTitle;
                activeGroupPowers = membership.GroupPowers;
                activeGroupName = membership.GroupName;
            }

            UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, agentID);
            string firstname, lastname;
            if (account != null)
            {
                firstname = account.FirstName;
                lastname = account.LastName;
            }
            else
            {
                firstname = "Unknown";
                lastname = "Unknown";
            }

            remoteClient.SendAgentDataUpdate(agentID, activeGroupID, firstname,
                    lastname, activeGroupPowers, activeGroupName,
                    activeGroupTitle);

            if (tellOthers)
                SendScenePresenceUpdate(agentID, activeGroupTitle);

            ScenePresence sp = (ScenePresence)remoteClient.SceneAgent;
            if (sp != null)
                sp.Grouptitle = activeGroupTitle;
        }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:44,代码来源:GroupsModule.cs

示例6: OnAgentDataUpdateRequest

        private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID,
            bool sendToAll)
        {
            if (m_debugEnabled)
                MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);

            UUID activeGroupID = UUID.Zero;
            string activeGroupTitle = string.Empty;
            string activeGroupName = string.Empty;
            ulong activeGroupPowers = (ulong) GroupPowers.None;

            GroupMembershipData membership = m_cachedGroupTitles.ContainsKey(dataForAgentID)
                                                 ? m_cachedGroupTitles[dataForAgentID]
                                                 : m_groupData.GetGroupMembershipData(
                                                     GetRequestingAgentID(remoteClient),
                                                     UUID.Zero,
                                                     dataForAgentID);
            m_cachedGroupTitles[dataForAgentID] = membership;
            if (membership != null)
            {
                activeGroupID = membership.GroupID;
                activeGroupTitle = membership.GroupTitle;
                activeGroupPowers = membership.GroupPowers;
                activeGroupName = membership.GroupName;
            }

            //Gotta tell the client about their groups
            remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, remoteClient.Name, activeGroupPowers, activeGroupName,
                                             activeGroupTitle);

            if (sendToAll)
                SendScenePresenceUpdate(dataForAgentID, activeGroupTitle);
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:33,代码来源:GroupsModule.cs

示例7: OnAgentDataUpdateRequest

        private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID, bool sendToAll)
        {
            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            UUID activeGroupID = UUID.Zero;
            string activeGroupTitle = string.Empty;
            string activeGroupName = string.Empty;
            ulong activeGroupPowers  = (ulong)GroupPowers.None;

            GroupMembershipData membership = m_groupData.GetAgentActiveMembership(GetRequestingAgentID(remoteClient), dataForAgentID);
            if (membership != null)
            {
                activeGroupID = membership.GroupID;
                activeGroupTitle = membership.GroupTitle;
                activeGroupPowers = membership.GroupPowers;
                activeGroupName = membership.GroupName;
            }

            //Gotta tell the client about their groups
            remoteClient.SendAgentDataUpdate (dataForAgentID, activeGroupID, remoteClient.FirstName,
                    remoteClient.LastName, activeGroupPowers, activeGroupName,
                    activeGroupTitle);

            if(sendToAll)
                SendScenePresenceUpdate(dataForAgentID, activeGroupTitle);
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:26,代码来源:GroupsModule.cs


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