private void TeleportFinishEventHandler(string message, OSD osd, Simulator simulator)
{
OSDMap map = (OSDMap)osd;
OSDArray array = (OSDArray)map["Info"];
for (int i = 0; i < array.Count; i++)
{
TeleportFinishPacket p = new TeleportFinishPacket();
OSDMap data = (OSDMap)array[i];
p.Info.AgentID = data["AgentID"].AsUUID();
p.Info.LocationID = Utils.BytesToUInt(data["LocationID"].AsBinary());
p.Info.RegionHandle = Utils.BytesToUInt64BE(data["RegionHandle"].AsBinary());
p.Info.SeedCapability = data["SeedCapability"].AsBinary();
p.Info.SimAccess = (byte)data["SimAccess"].AsInteger();
p.Info.SimIP = Utils.BytesToUInt(data["SimIP"].AsBinary());
p.Info.SimPort = (ushort)data["SimPort"].AsInteger();
p.Info.TeleportFlags = Utils.BytesToUInt(data["TeleportFlags"].AsBinary());
// pass the packet onto the teleport handler
TeleportHandler(p, simulator);
}
}