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


C# WhiteCore.ScriptEngine.DotNetEngine.LSL_Types.LSLString.ToString方法代码示例

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


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

示例1: llRequestDisplayName

        public LSL_Key llRequestDisplayName(LSL_Key uuid)
        {
            UUID userID = UUID.Zero;

            if (!UUID.TryParse(uuid, out userID))
            {
                // => complain loudly, as specified by the LSL docs
                Error("llRequestDisplayName", "Failed to parse uuid for avatar.");

                return UUID.Zero.ToString();
            }

            DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
            UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());

            Util.FireAndForget(delegate
                                   {
                                       string name = "";
                                       IProfileConnector connector =
                                           Framework.Utilities.DataManager.RequestPlugin<IProfileConnector>();
                                       if (connector != null)
                                       {
                                           IUserProfileInfo info = connector.GetUserProfile(userID);
                                           if (info != null)
                                               name = info.DisplayName;
                                       }
                                       dataserverPlugin.AddReply(uuid.ToString(),
                                                                 name, 100);
                                   });

            PScriptSleep(m_sleepMsOnRequestUserName);
            return tid.ToString();
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:33,代码来源:LSL_Api.cs

示例2: llTeleportAgentHome

        public DateTime llTeleportAgentHome(LSL_Key _agent)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
                return DateTime.Now;

            string agent = _agent.ToString();

            UUID agentId = new UUID();
            if (UUID.TryParse(agent, out agentId))
            {
                IScenePresence presence = World.GetScenePresence(agentId);
                if (presence != null)
                {
                    // agent must be over the owners land
                    IParcelManagementModule parcelManagement = World.RequestModuleInterface<IParcelManagementModule>();
                    if (parcelManagement != null)
                    {
                        if (m_host.OwnerID != parcelManagement.GetLandObject(
                            presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID &&
                            !World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
                        {
                            return PScriptSleep(m_sleepMsOnTeleportAgentHome);
                        }
                    }

                    //Send disable cancel so that the agent cannot attempt to stay in the region
                    presence.ControllingClient.SendTeleportStart((uint)TeleportFlags.DisableCancel);
                    IEntityTransferModule transferModule = World.RequestModuleInterface<IEntityTransferModule>();
                    if (transferModule != null)
                        transferModule.TeleportHome(agentId, presence.ControllingClient);
                    else
                        presence.ControllingClient.SendTeleportFailed("Unable to perform teleports on this simulator.");
                }
            }
            return PScriptSleep(m_sleepMsOnTeleportAgentHome);
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:36,代码来源:LSL_Api.cs

示例3: llRequestUsername

        public LSL_Key llRequestUsername(LSL_Key uuid)
        {
            UUID userID = UUID.Zero;

            if (!UUID.TryParse(uuid, out userID))
            {
                // => complain loudly, as specified by the LSL docs
                Error("llRequestUsername", "Failed to parse uuid for avatar.");

                return UUID.Zero.ToString();
            }

            DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
            UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());

            Util.FireAndForget(delegate
                                   {
                                       string name = "";
                                       UserAccount info =
                                           World.UserAccountService.GetUserAccount(World.RegionInfo.AllScopeIDs, userID);
                                       if (info != null)
                                           name = info.Name;
                                       dataserverPlugin.AddReply(uuid.ToString(), name, 100);
                                   });

            PScriptSleep(m_sleepMsOnRequestUserName);
            return tid.ToString();
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:28,代码来源:LSL_Api.cs


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