home = (OSDMap)osdHome;
OSD homeRegion = null;
if ( ((homeRegion = home.get("region_handle")) !=null) && homeRegion.getType().equals(OSDType.Array))
{
OSDArray homeArray = (OSDArray)homeRegion;
if (homeArray.count() == 2)
HomeRegion = new BigInteger(Utils.int64ToBytes(Utils.uintsToLong((long)homeArray.get(0).asInteger(), (long)homeArray.get(1).asInteger())));
else
HomeRegion = new BigInteger("0");
}
HomePosition = ParseVector3("position", home);
HomeLookAt = ParseVector3("look_at", home);
}
else
{
HomeRegion = new BigInteger("0");
HomePosition = Vector3.Zero;
HomeLookAt = Vector3.Zero;
}
CircuitCode = (int)ParseUInt("circuit_code", reply);
RegionX = (int)ParseUInt("region_x", reply);
RegionY = (int)ParseUInt("region_y", reply);
SimPort = (short)ParseUInt("sim_port", reply);
String simIP = ParseString("sim_ip", reply);
InetAddress[] simIParray = new InetAddress[1];
if(PlatformUtils.tryParseInetAddress(simIP, simIParray))
SimIP = simIParray[0];
else
simIParray = null;
SeedCapability = ParseString("seed_capability", reply);
// Buddy list
OSD buddyLLSD = null;
if ( ((buddyLLSD = reply.get("buddy-list"))!=null) && buddyLLSD.getType().equals(OSDType.Array))
{
List<BuddyListEntry> buddys = new ArrayList<BuddyListEntry>();
OSDArray buddyArray = (OSDArray)buddyLLSD;
for (int i = 0; i < buddyArray.count(); i++)
{
if (buddyArray.get(i).getType().equals(OSDType.Map))
{
BuddyListEntry bud = new BuddyListEntry();
OSDMap buddy = (OSDMap)buddyArray.get(i);
bud.buddy_id = buddy.get("buddy_id").asString();
bud.buddy_rights_given = (int)ParseUInt("buddy_rights_given", buddy);
bud.buddy_rights_has = (int)ParseUInt("buddy_rights_has", buddy);