Implement SendPlacesReply

viewer-2-initial-appearance
Melanie 2010-12-30 00:31:59 +01:00
parent d42e0c39fc
commit a32f80b9e3
8 changed files with 97 additions and 0 deletions

View File

@ -1720,5 +1720,9 @@ namespace OpenSim.Client.MXP.ClientStack
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}

View File

@ -1223,5 +1223,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}

View File

@ -584,6 +584,23 @@ namespace OpenSim.Framework
}
}
public class PlacesReplyData
{
public UUID OwnerID;
public string Name;
public string Desc;
public int ActualArea;
public int BillableArea;
public byte Flags;
public uint GlobalX;
public uint GlobalY;
public uint GlobalZ;
public string SimName;
public UUID SnapshotID;
public uint Dwell;
public int Price;
}
/// <summary>
/// Specifies the fields that have been changed when sending a prim or
/// avatar update
@ -1316,5 +1333,7 @@ namespace OpenSim.Framework
void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
void StopFlying(ISceneEntity presence);
void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data);
}
}

View File

@ -11997,7 +11997,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
// AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient)));
}
public void SendPlacesReply(UUID queryID, UUID transactionID,
PlacesReplyData[] data)
{
PlacesReplyPacket reply = null;
PlacesReplyPacket.QueryDataBlock[] dataBlocks =
new PlacesReplyPacket.QueryDataBlock[0];
for (int i = 0 ; i < data.Length ; i++)
{
PlacesReplyPacket.QueryDataBlock block =
new PlacesReplyPacket.QueryDataBlock();
block.OwnerID = data[i].OwnerID;
block.Name = Util.StringToBytes256(data[i].Name);
block.Desc = Util.StringToBytes1024(data[i].Desc);
block.ActualArea = data[i].ActualArea;
block.BillableArea = data[i].BillableArea;
block.Flags = data[i].Flags;
block.GlobalX = data[i].GlobalX;
block.GlobalY = data[i].GlobalY;
block.GlobalZ = data[i].GlobalZ;
block.SimName = Util.StringToBytes256(data[i].SimName);
block.SnapshotID = data[i].SnapshotID;
block.Dwell = data[i].Dwell;
block.Price = data[i].Price;
if (reply != null && reply.Length + block.Length > 1400)
{
OutPacket(reply, ThrottleOutPacketType.Task);
reply = null;
dataBlocks = new PlacesReplyPacket.QueryDataBlock[0];
}
if (reply == null)
{
reply = (PlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.PlacesReply);
reply.AgentData = new PlacesReplyPacket.AgentDataBlock();
reply.AgentData.AgentID = AgentId;
reply.AgentData.QueryID = queryID;
reply.TransactionData = new PlacesReplyPacket.TransactionDataBlock();
reply.TransactionData.TransactionID = transactionID;
reply.QueryData = dataBlocks;
}
Array.Resize(ref dataBlocks, dataBlocks.Length + 1);
dataBlocks[dataBlocks.Length - 1] = block;
reply.QueryData = dataBlocks;
}
if (reply != null)
OutPacket(reply, ThrottleOutPacketType.Task);
}
}
}

View File

@ -1165,5 +1165,9 @@ namespace OpenSim.Region.Examples.SimpleModule
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}

View File

@ -1686,5 +1686,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}

View File

@ -1170,5 +1170,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}

View File

@ -1225,5 +1225,9 @@ namespace OpenSim.Tests.Common.Mock
public void StopFlying(ISceneEntity presence)
{
}
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
{
}
}
}