Plumb in the DirPlacesReply packet

0.6.0-stable
Melanie Thielker 2008-10-05 02:25:53 +00:00
parent 649cd16fb4
commit 13e3ffada3
4 changed files with 50 additions and 0 deletions

View File

@ -312,6 +312,15 @@ namespace OpenSim.Framework
public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart);
#endregion
public struct DirPlacesReplyData
{
public UUID parcelID;
public string name;
public bool forSale;
public bool auction;
public float dwell;
}
public interface IClientAPI
{
Vector3 StartPos { get; set; }
@ -764,6 +773,8 @@ namespace OpenSim.Framework
void SendRegionHandle(UUID regoinID, ulong handle);
void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data);
void KillEndDone();
}
}

View File

@ -6725,6 +6725,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return string.Empty;
}
public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
{
DirPlacesReplyPacket packet = (DirPlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirPlacesReply);
packet.AgentData = new DirPlacesReplyPacket.AgentDataBlock();
packet.QueryData = new DirPlacesReplyPacket.QueryDataBlock[1];
packet.QueryData[0] = new DirPlacesReplyPacket.QueryDataBlock();
packet.QueryReplies =
new DirPlacesReplyPacket.QueryRepliesBlock[data.Length];
packet.AgentData.AgentID = AgentId;
packet.QueryData[0].QueryID = queryID;
int i = 0;
foreach (DirPlacesReplyData d in data)
{
packet.QueryReplies[i] =
new DirPlacesReplyPacket.QueryRepliesBlock();
packet.QueryReplies[i].ParcelID = d.parcelID;
packet.QueryReplies[i].Name = Utils.StringToBytes(d.name);
packet.QueryReplies[i].ForSale = d.forSale;
packet.QueryReplies[i].Auction = d.auction;
packet.QueryReplies[i].Dwell = d.dwell;
}
OutPacket(packet, ThrottleOutPacketType.Task);
}
public void KillEndDone()
{
KillPacket kp = new KillPacket();

View File

@ -891,6 +891,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
{
}
public void KillEndDone()
{
}

View File

@ -888,6 +888,10 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
{
}
public void KillEndDone()
{
}