public override void FromOSD (OSDMap map)
{
if (map.ContainsKey ("uuid"))
RegionID = map ["uuid"].AsUUID ();
if (map.ContainsKey ("locX"))
RegionLocX = map ["locX"].AsInteger ();
if (map.ContainsKey ("locY"))
RegionLocY = map ["locY"].AsInteger ();
if (map.ContainsKey ("locZ"))
RegionLocZ = map ["locZ"].AsInteger ();
if (map.ContainsKey ("regionName"))
RegionName = map ["regionName"].AsString ();
if (map.ContainsKey ("regionType"))
RegionType = map ["regionType"].AsString ();
ExternalHostName = map.ContainsKey ("serverIP") ? map ["serverIP"].AsString () : "127.0.0.1";
InternalPort = map ["serverPort"].AsInteger ();
if (map.ContainsKey ("serverHttpPort"))
{
UInt32 port = map ["serverHttpPort"].AsUInteger ();
HttpPort = port;
}
if (map.ContainsKey ("regionMapTexture"))
TerrainImage = map ["regionMapTexture"].AsUUID ();
if (map.ContainsKey ("regionTerrainTexture"))
TerrainMapImage = map ["regionTerrainTexture"].AsUUID ();
if (map.ContainsKey ("ParcelMapImage"))
ParcelMapImage = map ["ParcelMapImage"].AsUUID ();
if (map.ContainsKey ("access"))
Access = (byte)map ["access"].AsInteger ();
if (map.ContainsKey ("owner_uuid"))
EstateOwner = map ["owner_uuid"].AsUUID ();
if (map.ContainsKey ("EstateOwner"))
EstateOwner = map ["EstateOwner"].AsUUID ();
if (map.ContainsKey ("sizeX"))
RegionSizeX = map ["sizeX"].AsInteger ();
if (map.ContainsKey ("sizeY"))
RegionSizeY = map ["sizeY"].AsInteger ();
if (map.ContainsKey ("sizeZ"))
RegionSizeZ = map ["sizeZ"].AsInteger ();
if (map.ContainsKey ("LastSeen"))
LastSeen = map ["LastSeen"].AsInteger ();
if (map.ContainsKey ("SessionID"))
SessionID = map ["SessionID"].AsUUID ();
if (map.ContainsKey ("Flags"))
Flags = map ["Flags"].AsInteger ();
if (map.ContainsKey ("ScopeID"))
ScopeID = map ["ScopeID"].AsUUID ();
if (map.ContainsKey ("AllScopeIDs"))
AllScopeIDs = ((OSDArray)map ["AllScopeIDs"]).ConvertAll<UUID> (o => o);
if (map.ContainsKey ("remoteEndPointIP"))
{
IPAddress add = new IPAddress (map ["remoteEndPointIP"].AsBinary ());
int port = map ["remoteEndPointPort"].AsInteger ();
m_remoteEndPoint = new IPEndPoint (add, port);
}
if (map.ContainsKey ("regionTerrain"))
RegionTerrain = map ["regionTerrain"].AsString ();
if (map.ContainsKey ("regionArea"))
RegionArea = (uint)map ["regionArea"].AsInteger ();
}