aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs28
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs12
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs18
3 files changed, 21 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index beb83af..428fb77 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -268,29 +268,27 @@ namespace OpenSim.Region.ClientStack
268 /// <remarks>TODO</remarks> 268 /// <remarks>TODO</remarks>
269 /// <param name="message"></param> 269 /// <param name="message"></param>
270 /// <param name="target"></param> 270 /// <param name="target"></param>
271 public void SendInstantMessage(string message, LLUUID target, string fromName) 271 public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp)
272 { 272 {
273 if (message != "typing") 273
274 {
275 Encoding enc = Encoding.ASCII; 274 Encoding enc = Encoding.ASCII;
276 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); 275 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket();
277 msg.AgentData.AgentID = this.AgentID; 276 msg.AgentData.AgentID = fromAgent;
278 msg.AgentData.SessionID = this.SessionID; 277 msg.AgentData.SessionID = fromAgentSession;
279 msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0"); 278 msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0");
280 msg.MessageBlock.Dialog = 0; 279 msg.MessageBlock.Dialog = dialog;
281 msg.MessageBlock.FromGroup = false; 280 msg.MessageBlock.FromGroup = false;
282 msg.MessageBlock.ID = target.Combine(this.SecureSessionID); 281 msg.MessageBlock.ID = imSessionID;
283 msg.MessageBlock.Offline = 0; 282 msg.MessageBlock.Offline = 0;
284 msg.MessageBlock.ParentEstateID = 0; 283 msg.MessageBlock.ParentEstateID = 0;
285 msg.MessageBlock.Position = new LLVector3(); 284 msg.MessageBlock.Position = new LLVector3();
286 msg.MessageBlock.RegionID = new LLUUID(); 285 msg.MessageBlock.RegionID = LLUUID.Random();
287 msg.MessageBlock.Timestamp = 0; 286 msg.MessageBlock.Timestamp = timeStamp;
288 msg.MessageBlock.ToAgentID = target; 287 msg.MessageBlock.ToAgentID = toAgent;
289 msg.MessageBlock.Message = enc.GetBytes(message + "\0"); 288 msg.MessageBlock.Message = enc.GetBytes(message + "\0");
290 msg.MessageBlock.BinaryBucket = new byte[0]; 289 msg.MessageBlock.BinaryBucket = new byte[0];
291 290
292 this.OutPacket(msg); 291 this.OutPacket(msg);
293 }
294 } 292 }
295 293
296 /// <summary> 294 /// <summary>
@@ -927,7 +925,7 @@ namespace OpenSim.Region.ClientStack
927 { 925 {
928 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 926 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
929 outPacket.RegionData.RegionHandle = regionHandle; 927 outPacket.RegionData.RegionHandle = regionHandle;
930 outPacket.RegionData.TimeDilation = timeDilation; 928 outPacket.RegionData.TimeDilation = timeDilation;
931 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 929 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
932 930
933 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); 931 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags);
@@ -938,6 +936,9 @@ namespace OpenSim.Region.ClientStack
938 outPacket.ObjectData[0].Text = Helpers.StringToField(text); 936 outPacket.ObjectData[0].Text = Helpers.StringToField(text);
939 outPacket.ObjectData[0].ParentID = parentID; 937 outPacket.ObjectData[0].ParentID = parentID;
940 outPacket.ObjectData[0].PSBlock = particleSystem; 938 outPacket.ObjectData[0].PSBlock = particleSystem;
939 outPacket.ObjectData[0].ClickAction = 0;
940 //outPacket.ObjectData[0].Flags = 0;
941 outPacket.ObjectData[0].Radius = 20;
941 942
942 byte[] pb = pos.GetBytes(); 943 byte[] pb = pos.GetBytes();
943 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 944 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
@@ -1045,6 +1046,7 @@ namespace OpenSim.Region.ClientStack
1045 bytes[i++] = (byte)((ac >> 8) % 256); 1046 bytes[i++] = (byte)((ac >> 8) % 256);
1046 1047
1047 dat.Data = bytes; 1048 dat.Data = bytes;
1049
1048 return (dat); 1050 return (dat);
1049 } 1051 }
1050 1052
@@ -1196,7 +1198,7 @@ namespace OpenSim.Region.ClientStack
1196 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); 1198 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
1197 1199
1198 SetDefaultAvatarPacketValues(ref objdata); 1200 SetDefaultAvatarPacketValues(ref objdata);
1199 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); 1201 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
1200 objdata.PathCurve = 16; 1202 objdata.PathCurve = 16;
1201 objdata.ProfileCurve = 1; 1203 objdata.ProfileCurve = 1;
1202 objdata.PathScaleX = 100; 1204 objdata.PathScaleX = 100;
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index a6cb281..903ddcc 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -121,14 +121,12 @@ namespace OpenSim.Region.ClientStack
121 break; 121 break;
122 case PacketType.ImprovedInstantMessage: 122 case PacketType.ImprovedInstantMessage:
123 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; 123 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
124
125 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 124 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
126 string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message); 125 string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message);
127
128 if (OnInstantMessage != null) 126 if (OnInstantMessage != null)
129 { 127 {
130 this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.MessageBlock.ToAgentID, 128 this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID,
131 msgpack.MessageBlock.Timestamp, IMfromName, IMmessage); 129 msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, msgpack.MessageBlock.Dialog);
132 } 130 }
133 break; 131 break;
134 case PacketType.RezObject: 132 case PacketType.RezObject:
@@ -235,7 +233,6 @@ namespace OpenSim.Region.ClientStack
235 { 233 {
236 ObjectAddPacket addPacket = (ObjectAddPacket)Pack; 234 ObjectAddPacket addPacket = (ObjectAddPacket)Pack;
237 PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); 235 PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket);
238
239 OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); 236 OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape);
240 } 237 }
241 break; 238 break;
@@ -460,9 +457,12 @@ namespace OpenSim.Region.ClientStack
460 } 457 }
461 break; 458 break;
462 case PacketType.UpdateTaskInventory: 459 case PacketType.UpdateTaskInventory:
463 // Console.WriteLine(Pack.ToString()); 460 //Console.WriteLine(Pack.ToString());
464 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; 461 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
465 break; 462 break;
463 case PacketType.RezScript:
464 //Console.WriteLine(Pack.ToString());
465 break;
466 case PacketType.MapLayerRequest: 466 case PacketType.MapLayerRequest:
467 this.RequestMapLayer(); 467 this.RequestMapLayer();
468 break; 468 break;
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index a91c35d..e56d361 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -273,23 +273,5 @@ namespace OpenSim.Region.ClientStack
273 this.ClientThread.Abort(); 273 this.ClientThread.Abort();
274 } 274 }
275 275
276 #region Inventory Creation
277 private void SetupInventory(AuthenticateResponse sessionInfo)
278 {
279
280 }
281 private AgentInventory CreateInventory(LLUUID baseFolder)
282 {
283 AgentInventory inventory = null;
284
285 return inventory;
286 }
287
288 private void CreateInventoryItem(CreateInventoryItemPacket packet)
289 {
290
291 }
292 #endregion
293
294 } 276 }
295} 277}