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


C# RegionInfo.SetEndPoint方法代码示例

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


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

示例1: GetRegionInfo

 public RegionInfo GetRegionInfo(string regionName)
 {
     List<string> RetVal = GD.Query("RegionName", regionName, "simulator", "*");
     RegionInfo replyData = new RegionInfo();
     if (RetVal.Count == 0)
         return null;
     int i = 0;
     for (i = 0; i < RetVal.Count; i++)
     {
         if (i == 0)
             replyData.RegionID = new UUID(RetVal[i]);
         if (i == 1)
             replyData.RegionName = RetVal[i];
         if (i == 2)
             replyData.RegionLocX = uint.Parse(RetVal[i]);
         if (i == 3)
             replyData.RegionLocY = uint.Parse(RetVal[i]);
         if (i == 6)
             replyData.ExternalHostName = RetVal[i];
         if (i == 7)
             replyData.RegionType = RetVal[i];
         if (i == 11)
             replyData.ObjectCapacity = Convert.ToInt32(RetVal[i]);
         if (i == 15)
             replyData.AccessLevel = Convert.ToByte(RetVal[i]);
         if (i == 16)
             replyData.Disabled = int.Parse(RetVal[i]) == 1;
         if (i == 17)
             replyData.AllowScriptCrossing = int.Parse(RetVal[i]) == 1;
         if (i == 18)
             replyData.TrustBinariesFromForeignSims = int.Parse(RetVal[i]) == 1;
         if (i == 19)
             replyData.SeeIntoThisSimFromNeighbor = int.Parse(RetVal[i]) == 1;
         if (i == 20)
         {
             replyData.AllowPhysicalPrims = int.Parse(RetVal[i]) == 1;
             replyData.SetEndPoint(RetVal[4], int.Parse(RetVal[5]));
             if (replyData.ExternalHostName == "DEFAULT")
             {
                 replyData.ExternalHostName = Aurora.Framework.Utilities.GetExternalIp();
             }
             replyData.HttpPort = uint.Parse(RetVal[5]);
         }
     }
     return replyData;
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:46,代码来源:LocalRegionInfoConnector.cs

示例2: GetRegionInfos

        public RegionInfo[] GetRegionInfos()
        {
            List<RegionInfo> Infos = new List<RegionInfo>();
            List<string> RetVal = GD.Query("Disabled", false, "simulator", "*");
            if (RetVal.Count == 0)
                return Infos.ToArray();
            int DataCount = 0;
            RegionInfo replyData = new RegionInfo();
            for (int i = 0; i < RetVal.Count; i++)
            {
                if (DataCount == 0)
                    replyData.RegionID = new UUID(RetVal[i]);
                if (DataCount == 1)
                    replyData.RegionName = RetVal[i];
                if (DataCount == 2)
                    replyData.RegionLocX = uint.Parse(RetVal[i]);
                if (DataCount == 3)
                    replyData.RegionLocY = uint.Parse(RetVal[i]);
                if (DataCount == 6)
                    replyData.ExternalHostName = RetVal[i];
                if (DataCount == 7)
                    replyData.RegionType = RetVal[i];
                if (DataCount == 11)
                    replyData.ObjectCapacity = Convert.ToInt32(RetVal[i]);
                if (DataCount == 15)
                    replyData.AccessLevel = Convert.ToByte(RetVal[i]);
                if (DataCount == 16)
                    replyData.Disabled = int.Parse(RetVal[i]) == 1;
                if (DataCount == 17)
                    replyData.AllowScriptCrossing = int.Parse(RetVal[i]) == 1;
                if (DataCount == 18)
                    replyData.TrustBinariesFromForeignSims = int.Parse(RetVal[i]) == 1;
                if (DataCount == 19)
                    replyData.SeeIntoThisSimFromNeighbor = int.Parse(RetVal[i]) == 1;
                if (DataCount == 20)
                    replyData.AllowPhysicalPrims = int.Parse(RetVal[i]) == 1;
                DataCount++;

                if (DataCount == 21)
                {
                    replyData.SetEndPoint(RetVal[(i - (DataCount - 1)) + 4], int.Parse(RetVal[(i - (DataCount - 1)) + 5]));
                    if (replyData.ExternalHostName == "DEFAULT")
                    {
                        replyData.ExternalHostName = Aurora.Framework.Utilities.GetExternalIp();
                    }
                    replyData.HttpPort = uint.Parse(RetVal[(i - (DataCount - 1)) + 5]);
                    DataCount = 0;
                    Infos.Add(replyData);
                    replyData = new RegionInfo();
                }
            }
            return Infos.ToArray();
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:53,代码来源:LocalRegionInfoConnector.cs


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