public void OnFindAgentReplyHandler(Packet packet, Simulator simulator)
{
if(OnFriendFound != null)
{
FindAgentPacket reply = (FindAgentPacket)packet;
float x,y;
UUID prey = reply.AgentBlock.Prey;
ulong regionHandle = Helpers.GlobalPosToRegionHandle((float)reply.LocationBlock[0].GlobalX,
(float)reply.LocationBlock[0].GlobalY, out x, out y);
Vector3 xyz = new Vector3(x, y, 0f);
try { OnFriendFound(prey, regionHandle, xyz); }
catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
}
}