diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index a66caab840..1d93382e18 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -1720,5 +1720,9 @@ namespace OpenSim.Client.MXP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index c8eca9f62e..f2b58d3c4c 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -1223,5 +1223,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 21ffa9a954..a6be157688 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -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; + } + /// /// 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); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index d63b7194c7..ee4f04ea83 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -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); } } } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 311352c032..41d6628a97 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -1165,5 +1165,9 @@ namespace OpenSim.Region.Examples.SimpleModule public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 20870aa528..49382f0f26 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -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) + { + } } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 0c43c8a9cd..5d44aa1a8c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1170,5 +1170,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 3f3845c1cb..dc0d4deb18 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -1225,5 +1225,9 @@ namespace OpenSim.Tests.Common.Mock public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } }