本文整理汇总了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
}