本文整理匯總了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
}