diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs | 472 |
1 files changed, 236 insertions, 236 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs index e67807e..27265cf 100644 --- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs +++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs | |||
@@ -1,236 +1,236 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | 2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | using libsecondlife.Packets; | 29 | using libsecondlife.Packets; |
30 | using OpenSim.Framework.Console; | 30 | using OpenSim.Framework.Console; |
31 | 31 | ||
32 | namespace OpenSim.Region.ClientStack | 32 | namespace OpenSim.Region.ClientStack |
33 | { | 33 | { |
34 | public partial class ClientView | 34 | public partial class ClientView |
35 | { | 35 | { |
36 | protected virtual void RegisterLocalPacketHandlers() | 36 | protected virtual void RegisterLocalPacketHandlers() |
37 | { | 37 | { |
38 | this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout); | 38 | this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout); |
39 | this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached); | 39 | this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached); |
40 | this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate); | 40 | this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate); |
41 | } | 41 | } |
42 | 42 | ||
43 | protected virtual bool Logout(ClientView simClient, Packet packet) | 43 | protected virtual bool Logout(ClientView simClient, Packet packet) |
44 | { | 44 | { |
45 | MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); | 45 | MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); |
46 | //send reply to let the client logout | 46 | //send reply to let the client logout |
47 | LogoutReplyPacket logReply = new LogoutReplyPacket(); | 47 | LogoutReplyPacket logReply = new LogoutReplyPacket(); |
48 | logReply.AgentData.AgentID = this.AgentID; | 48 | logReply.AgentData.AgentID = this.AgentID; |
49 | logReply.AgentData.SessionID = this.SessionID; | 49 | logReply.AgentData.SessionID = this.SessionID; |
50 | logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; | 50 | logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; |
51 | logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); | 51 | logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); |
52 | logReply.InventoryData[0].ItemID = LLUUID.Zero; | 52 | logReply.InventoryData[0].ItemID = LLUUID.Zero; |
53 | OutPacket(logReply); | 53 | OutPacket(logReply); |
54 | // | 54 | // |
55 | this.KillClient(); | 55 | this.KillClient(); |
56 | return true; | 56 | return true; |
57 | } | 57 | } |
58 | 58 | ||
59 | protected bool AgentTextureCached(ClientView simclient, Packet packet) | 59 | protected bool AgentTextureCached(ClientView simclient, Packet packet) |
60 | { | 60 | { |
61 | // Console.WriteLine(packet.ToString()); | 61 | // Console.WriteLine(packet.ToString()); |
62 | AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet; | 62 | AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet; |
63 | AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); | 63 | AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); |
64 | cachedresp.AgentData.AgentID = this.AgentID; | 64 | cachedresp.AgentData.AgentID = this.AgentID; |
65 | cachedresp.AgentData.SessionID = this.SessionID; | 65 | cachedresp.AgentData.SessionID = this.SessionID; |
66 | cachedresp.AgentData.SerialNum = this.cachedtextureserial; | 66 | cachedresp.AgentData.SerialNum = this.cachedtextureserial; |
67 | this.cachedtextureserial++; | 67 | this.cachedtextureserial++; |
68 | cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length]; | 68 | cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length]; |
69 | for (int i = 0; i < chechedtex.WearableData.Length; i++) | 69 | for (int i = 0; i < chechedtex.WearableData.Length; i++) |
70 | { | 70 | { |
71 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); | 71 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); |
72 | cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex; | 72 | cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex; |
73 | cachedresp.WearableData[i].TextureID = LLUUID.Zero; | 73 | cachedresp.WearableData[i].TextureID = LLUUID.Zero; |
74 | cachedresp.WearableData[i].HostName = new byte[0]; | 74 | cachedresp.WearableData[i].HostName = new byte[0]; |
75 | } | 75 | } |
76 | this.OutPacket(cachedresp); | 76 | this.OutPacket(cachedresp); |
77 | return true; | 77 | return true; |
78 | } | 78 | } |
79 | 79 | ||
80 | protected bool MultipleObjUpdate(ClientView simClient, Packet packet) | 80 | protected bool MultipleObjUpdate(ClientView simClient, Packet packet) |
81 | { | 81 | { |
82 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; | 82 | MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; |
83 | //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); | 83 | //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); |
84 | for (int i = 0; i < multipleupdate.ObjectData.Length; i++) | 84 | for (int i = 0; i < multipleupdate.ObjectData.Length; i++) |
85 | { | 85 | { |
86 | #region position | 86 | #region position |
87 | if (multipleupdate.ObjectData[i].Type == 9) //change position | 87 | if (multipleupdate.ObjectData[i].Type == 9) //change position |
88 | { | 88 | { |
89 | if (OnUpdatePrimGroupPosition != null) | 89 | if (OnUpdatePrimGroupPosition != null) |
90 | { | 90 | { |
91 | LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 91 | LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
92 | OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); | 92 | OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); |
93 | } | 93 | } |
94 | 94 | ||
95 | } | 95 | } |
96 | else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position | 96 | else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position |
97 | { | 97 | { |
98 | if (OnUpdatePrimSinglePosition != null) | 98 | if (OnUpdatePrimSinglePosition != null) |
99 | { | 99 | { |
100 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 100 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
101 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 101 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
102 | OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); | 102 | OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | #endregion position | 105 | #endregion position |
106 | #region rotation | 106 | #region rotation |
107 | else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab | 107 | else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab |
108 | { | 108 | { |
109 | if (OnUpdatePrimSingleRotation != null) | 109 | if (OnUpdatePrimSingleRotation != null) |
110 | { | 110 | { |
111 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); | 111 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); |
112 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 112 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
113 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 113 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse | 116 | else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse |
117 | { | 117 | { |
118 | if (OnUpdatePrimSingleRotation != null) | 118 | if (OnUpdatePrimSingleRotation != null) |
119 | { | 119 | { |
120 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); | 120 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); |
121 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 121 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
122 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 122 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
123 | } | 123 | } |
124 | } | 124 | } |
125 | else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab | 125 | else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab |
126 | { | 126 | { |
127 | if (OnUpdatePrimGroupRotation != null) | 127 | if (OnUpdatePrimGroupRotation != null) |
128 | { | 128 | { |
129 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); | 129 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); |
130 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 130 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
131 | OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 131 | OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
132 | } | 132 | } |
133 | } | 133 | } |
134 | else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse | 134 | else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse |
135 | { | 135 | { |
136 | if (OnUpdatePrimGroupMouseRotation != null) | 136 | if (OnUpdatePrimGroupMouseRotation != null) |
137 | { | 137 | { |
138 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 138 | libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
139 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); | 139 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); |
140 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 140 | //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
141 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 141 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
142 | OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); | 142 | OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | #endregion | 145 | #endregion |
146 | #region scale | 146 | #region scale |
147 | else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab | 147 | else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab |
148 | { | 148 | { |
149 | if (OnUpdatePrimScale != null) | 149 | if (OnUpdatePrimScale != null) |
150 | { | 150 | { |
151 | LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); | 151 | LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); |
152 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 152 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
153 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 153 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | else if (multipleupdate.ObjectData[i].Type == 29)//group scale from mouse | 156 | else if (multipleupdate.ObjectData[i].Type == 29)//group scale from mouse |
157 | { | 157 | { |
158 | if (OnUpdatePrimScale != null) | 158 | if (OnUpdatePrimScale != null) |
159 | { | 159 | { |
160 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0); | 160 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0); |
161 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); | 161 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); |
162 | // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 162 | // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab | 165 | else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab |
166 | { | 166 | { |
167 | if (OnUpdatePrimScale != null) | 167 | if (OnUpdatePrimScale != null) |
168 | { | 168 | { |
169 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); | 169 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); |
170 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 170 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
171 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 171 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
172 | } | 172 | } |
173 | } | 173 | } |
174 | else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse | 174 | else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse |
175 | { | 175 | { |
176 | if (OnUpdatePrimScale != null) | 176 | if (OnUpdatePrimScale != null) |
177 | { | 177 | { |
178 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); | 178 | libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); |
179 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 179 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
180 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); | 180 | OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | #endregion | 183 | #endregion |
184 | } | 184 | } |
185 | return true; | 185 | return true; |
186 | } | 186 | } |
187 | 187 | ||
188 | public void RequestMapLayer() | 188 | public void RequestMapLayer() |
189 | { | 189 | { |
190 | //should be getting the map layer from the grid server | 190 | //should be getting the map layer from the grid server |
191 | //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area) | 191 | //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area) |
192 | MapLayerReplyPacket mapReply = new MapLayerReplyPacket(); | 192 | MapLayerReplyPacket mapReply = new MapLayerReplyPacket(); |
193 | mapReply.AgentData.AgentID = this.AgentID; | 193 | mapReply.AgentData.AgentID = this.AgentID; |
194 | mapReply.AgentData.Flags = 0; | 194 | mapReply.AgentData.Flags = 0; |
195 | mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1]; | 195 | mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1]; |
196 | mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock(); | 196 | mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock(); |
197 | mapReply.LayerData[0].Bottom = 0; | 197 | mapReply.LayerData[0].Bottom = 0; |
198 | mapReply.LayerData[0].Left = 0; | 198 | mapReply.LayerData[0].Left = 0; |
199 | mapReply.LayerData[0].Top = 30000; | 199 | mapReply.LayerData[0].Top = 30000; |
200 | mapReply.LayerData[0].Right = 30000; | 200 | mapReply.LayerData[0].Right = 30000; |
201 | mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); | 201 | mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); |
202 | this.OutPacket(mapReply); | 202 | this.OutPacket(mapReply); |
203 | } | 203 | } |
204 | 204 | ||
205 | public void RequestMapBlocks(int minX, int minY, int maxX, int maxY) | 205 | public void RequestMapBlocks(int minX, int minY, int maxX, int maxY) |
206 | { | 206 | { |
207 | /* | 207 | /* |
208 | IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); | 208 | IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); |
209 | MapBlockReplyPacket mbReply = new MapBlockReplyPacket(); | 209 | MapBlockReplyPacket mbReply = new MapBlockReplyPacket(); |
210 | mbReply.AgentData.AgentID = this.AgentID; | 210 | mbReply.AgentData.AgentID = this.AgentID; |
211 | int len; | 211 | int len; |
212 | if (simMapProfiles == null) | 212 | if (simMapProfiles == null) |
213 | len = 0; | 213 | len = 0; |
214 | else | 214 | else |
215 | len = simMapProfiles.Count; | 215 | len = simMapProfiles.Count; |
216 | 216 | ||
217 | mbReply.Data = new MapBlockReplyPacket.DataBlock[len]; | 217 | mbReply.Data = new MapBlockReplyPacket.DataBlock[len]; |
218 | int iii; | 218 | int iii; |
219 | for (iii = 0; iii < len; iii++) | 219 | for (iii = 0; iii < len; iii++) |
220 | { | 220 | { |
221 | Hashtable mp = (Hashtable)simMapProfiles[iii]; | 221 | Hashtable mp = (Hashtable)simMapProfiles[iii]; |
222 | mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); | 222 | mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); |
223 | mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); | 223 | mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); |
224 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); | 224 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); |
225 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); | 225 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); |
226 | mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); | 226 | mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); |
227 | mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); | 227 | mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); |
228 | mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); | 228 | mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); |
229 | mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); | 229 | mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); |
230 | mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]); | 230 | mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]); |
231 | } | 231 | } |
232 | this.OutPacket(mbReply); | 232 | this.OutPacket(mbReply); |
233 | */ | 233 | */ |
234 | } | 234 | } |
235 | } | 235 | } |
236 | } | 236 | } |