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


C# RegionInfo.PackRegionInfoData方法代码示例

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


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

示例1: UpdateRegionInfo

 public void UpdateRegionInfo(RegionInfo region)
 {
     RegionInfo oldRegion = GetRegionInfo(region.RegionID);
     if (oldRegion != null)
     {
         m_registry.RequestModuleInterface<ISimulationBase>().EventManager.FireGenericEventHandler("RegionInfoChanged", new[] 
         {
             oldRegion,
             region
         });
     }
     Dictionary<string, object> row = new Dictionary<string, object>(4);
     row["RegionID"] = region.RegionID;
     row["RegionName"] = region.RegionName.MySqlEscape(50);
     row["RegionInfo"] = OSDParser.SerializeJsonString(region.PackRegionInfoData(true));
     row["DisableD"] = region.Disabled ? 1 : 0;
     GD.Replace("simulator", row);
 }
开发者ID:TechplexEngineer,项目名称:Aurora-Sim,代码行数:18,代码来源:LocalRegionInfoConnector.cs

示例2: UpdateRegionInfo

 public void UpdateRegionInfo(RegionInfo region)
 {
     RegionInfo oldRegion = GetRegionInfo(region.RegionID);
     if (oldRegion != null)
     {
         m_registry.RequestModuleInterface<ISimulationBase>().EventManager.FireGenericEventHandler("RegionInfoChanged", new[] 
         {
             oldRegion,
             region
         });
     }
     List<object> Values = new List<object>
                               {
                                   region.RegionID,
                                   region.RegionName.MySqlEscape(50),
                                   OSDParser.SerializeJsonString(region.PackRegionInfoData(true)),
                                   region.Disabled ? 1 : 0
                               };
     GD.Replace("simulator", new[]{"RegionID","RegionName",
         "RegionInfo","Disabled"}, Values.ToArray());
 }
开发者ID:djphil,项目名称:Aurora-Sim,代码行数:21,代码来源:LocalRegionInfoConnector.cs

示例3: UpdateRegionInfo

        public void UpdateRegionInfo(string oldName, RegionInfo regionInfo)
        {
            IRegionInfoConnector connector = DataManager.RequestPlugin<IRegionInfoConnector>();
            if (connector != null)
            {
                //Make sure we have this region in the database
                if (connector.GetRegionInfo(oldName) == null)
                    return;
                RegionInfo copy = new RegionInfo();
                //Make an exact copy
                copy.UnpackRegionInfoData(regionInfo.PackRegionInfoData(true));

                //Fix the name of the region so we can delete the old one
                copy.RegionName = oldName;
                DeleteRegion(copy);
                //Now add the new one
                connector.UpdateRegionInfo(regionInfo);
            }
        }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:19,代码来源:RegionLoaderDataBaseSystem.cs


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