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


C# EstateBan.FromOSD方法代码示例

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


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

示例1: FromOSD

        public void FromOSD(OSD v)
        {
            OSDMap values = (OSDMap) v;
            EstateID = (uint) values["EstateID"].AsInteger();
            EstateName = values["EstateName"].AsString();
            AbuseEmailToEstateOwner = values["AbuseEmailToEstateOwner"].AsInteger() == 1;
            DenyAnonymous = values["DenyAnonymous"].AsInteger() == 1;
            ResetHomeOnTeleport = values["ResetHomeOnTeleport"].AsInteger() == 1;
            FixedSun = values["FixedSun"].AsInteger() == 1;
            DenyTransacted = values["DenyTransacted"].AsInteger() == 1;
            BlockDwell = values["BlockDwell"].AsInteger() == 1;
            DenyIdentified = values["DenyIdentified"].AsInteger() == 1;
            AllowVoice = values["AllowVoice"].AsInteger() == 1;
            UseGlobalTime = values["UseGlobalTime"].AsInteger() == 1;
            PricePerMeter = values["PricePerMeter"].AsInteger();
            TaxFree = values["TaxFree"].AsInteger() == 1;
            AllowDirectTeleport = values["AllowDirectTeleport"].AsInteger() == 1;
            RedirectGridX = values["RedirectGridX"].AsInteger();
            RedirectGridY = values["RedirectGridY"].AsInteger();
            ParentEstateID = (uint) values["ParentEstateID"].AsInteger();
            SunPosition = values["SunPosition"].AsReal();
            EstateSkipScripts = values["EstateSkipScripts"].AsInteger() == 1;
            BillableFactor = (float) values["BillableFactor"].AsReal();
            PublicAccess = values["PublicAccess"].AsInteger() == 1;
            AbuseEmail = values["AbuseEmail"].AsString();
            EstateOwner = values["EstateOwner"].AsUUID();
            AllowLandmark = values["AllowLandmark"].AsInteger() == 1;
            AllowParcelChanges = values["AllowParcelChanges"].AsInteger() == 1;
            AllowSetHome = values["AllowSetHome"].AsInteger() == 1;
            DenyMinors = values["DenyMinors"].AsInteger() == 1;
            //We always try to pull this in if it exists
            if (values.ContainsKey("EstatePass"))
                EstatePass = values["EstatePass"].AsString();

            OSDMap Managers = values["EstateManagers"] as OSDMap;
#if (!ISWIN)
            List<UUID> list = new List<UUID>();
            foreach (OSD id in Managers.Values)
                list.Add(id.AsUUID());
            EstateManagers = list.ToArray();
#else
            EstateManagers = Managers.Values.Select(ID => ID.AsUUID()).ToArray();
#endif

            OSDMap Ban = values["EstateBans"] as OSDMap;
            List<EstateBan> NewBan = new List<EstateBan>();
            foreach (OSD BannedUser in Ban.Values)
            {
                EstateBan ban = new EstateBan();
                ban.FromOSD(BannedUser);
                NewBan.Add(ban);
            }
            EstateBans = NewBan.ToArray();

            OSDMap Access = values["EstateAccess"] as OSDMap;
#if (!ISWIN)
            List<UUID> list1 = new List<UUID>();
            foreach (OSD uuid in Access.Values)
                list1.Add(uuid.AsUUID());
            EstateAccess = list1.ToArray();
#else
            EstateAccess = Access.Values.Select(UUID => UUID.AsUUID()).ToArray();
#endif

            OSDMap Groups = values["EstateGroups"] as OSDMap;
#if (!ISWIN)
            List<UUID> list2 = new List<UUID>();
            foreach (OSD uuid in Groups.Values)
                list2.Add(uuid.AsUUID());
            EstateGroups = list2.ToArray();
#else
            EstateGroups = Groups.Values.Select(UUID => UUID.AsUUID()).ToArray();
#endif
        }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:74,代码来源:EstateSettings.cs


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