diff options
author | MW | 2007-08-15 18:34:36 +0000 |
---|---|---|
committer | MW | 2007-08-15 18:34:36 +0000 |
commit | 94dded470d04f72c573bf0aa82e1f7522362c54a (patch) | |
tree | 0ecb098a3b75a6b0fee01c21ca11c614a32bceef /OpenSim/Region/ClientStack | |
parent | * We now have a field of spinning objects. (diff) | |
download | opensim-SC-94dded470d04f72c573bf0aa82e1f7522362c54a.zip opensim-SC-94dded470d04f72c573bf0aa82e1f7522362c54a.tar.gz opensim-SC-94dded470d04f72c573bf0aa82e1f7522362c54a.tar.bz2 opensim-SC-94dded470d04f72c573bf0aa82e1f7522362c54a.tar.xz |
More work on inventory, can now create other inventory types, like Clothes and body parts. [Note while you can edit these, at the moment your changes won't be saved between restarts. This will be fixed very soon.]
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 35 |
2 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index d9c7508..d7962dc 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -86,6 +86,8 @@ namespace OpenSim.Region.ClientStack | |||
86 | public event FetchInventoryDescendents OnFetchInventoryDescendents; | 86 | public event FetchInventoryDescendents OnFetchInventoryDescendents; |
87 | public event FetchInventory OnFetchInventory; | 87 | public event FetchInventory OnFetchInventory; |
88 | public event RequestTaskInventory OnRequestTaskInventory; | 88 | public event RequestTaskInventory OnRequestTaskInventory; |
89 | public event UDPAssetUploadRequest OnAssetUploadRequest; | ||
90 | public event XferReceive OnXferReceive; | ||
89 | 91 | ||
90 | public event UUIDNameRequest OnNameFromUUIDRequest; | 92 | public event UUIDNameRequest OnNameFromUUIDRequest; |
91 | 93 | ||
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 58d4cfe..1e3685b 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -217,7 +217,7 @@ namespace OpenSim.Region.ClientStack | |||
217 | case PacketType.ObjectAdd: | 217 | case PacketType.ObjectAdd: |
218 | if (OnAddPrim != null) | 218 | if (OnAddPrim != null) |
219 | { | 219 | { |
220 | ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; | 220 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; |
221 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); | 221 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
222 | 222 | ||
223 | OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); | 223 | OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); |
@@ -290,7 +290,7 @@ namespace OpenSim.Region.ClientStack | |||
290 | } | 290 | } |
291 | break; | 291 | break; |
292 | case PacketType.ObjectGrab: | 292 | case PacketType.ObjectGrab: |
293 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; | 293 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; |
294 | if (OnGrabObject != null) | 294 | if (OnGrabObject != null) |
295 | { | 295 | { |
296 | OnGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this); | 296 | OnGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this); |
@@ -338,7 +338,7 @@ namespace OpenSim.Region.ClientStack | |||
338 | #region Inventory/Asset/Other related packets | 338 | #region Inventory/Asset/Other related packets |
339 | case PacketType.RequestImage: | 339 | case PacketType.RequestImage: |
340 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 340 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
341 | 341 | ||
342 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) | 342 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) |
343 | { | 343 | { |
344 | m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet); | 344 | m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, imageRequest.RequestImage[i].Packet); |
@@ -351,14 +351,20 @@ namespace OpenSim.Region.ClientStack | |||
351 | break; | 351 | break; |
352 | case PacketType.AssetUploadRequest: | 352 | case PacketType.AssetUploadRequest: |
353 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; | 353 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; |
354 | // Console.WriteLine(request.ToString()); | 354 | if (OnAssetUploadRequest != null) |
355 | //this.UploadAssets.HandleUploadPacket(request, request.AssetBlock.TransactionID.Combine(this.SecureSessionID)); | 355 | { |
356 | OnAssetUploadRequest(this, request.AssetBlock.TransactionID.Combine(this.SecureSessionID), request.AssetBlock.TransactionID, request.AssetBlock.Type, request.AssetBlock.AssetData); | ||
357 | } | ||
356 | break; | 358 | break; |
357 | case PacketType.RequestXfer: | 359 | case PacketType.RequestXfer: |
358 | //Console.WriteLine(Pack.ToString()); | 360 | //Console.WriteLine(Pack.ToString()); |
359 | break; | 361 | break; |
360 | case PacketType.SendXferPacket: | 362 | case PacketType.SendXferPacket: |
361 | this.UploadAssets.HandleXferPacket((SendXferPacketPacket)Pack); | 363 | SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; |
364 | if (OnXferReceive != null) | ||
365 | { | ||
366 | OnXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); | ||
367 | } | ||
362 | break; | 368 | break; |
363 | case PacketType.CreateInventoryFolder: | 369 | case PacketType.CreateInventoryFolder: |
364 | if (this.OnCreateNewInventoryFolder != null) | 370 | if (this.OnCreateNewInventoryFolder != null) |
@@ -369,18 +375,11 @@ namespace OpenSim.Region.ClientStack | |||
369 | break; | 375 | break; |
370 | case PacketType.CreateInventoryItem: | 376 | case PacketType.CreateInventoryItem: |
371 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; | 377 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; |
372 | if (createItem.InventoryBlock.TransactionID != LLUUID.Zero) | 378 | if (this.OnCreateNewInventoryItem != null) |
373 | { | 379 | { |
374 | this.UploadAssets.CreateInventoryItem(createItem); | 380 | this.OnCreateNewInventoryItem(this, createItem.InventoryBlock.TransactionID, createItem.InventoryBlock.FolderID, createItem.InventoryBlock.CallbackID, |
375 | } | 381 | Util.FieldToString(createItem.InventoryBlock.Description), Util.FieldToString(createItem.InventoryBlock.Name), createItem.InventoryBlock.InvType, |
376 | else | 382 | createItem.InventoryBlock.Type, createItem.InventoryBlock.WearableType, createItem.InventoryBlock.NextOwnerMask); |
377 | { | ||
378 | if (this.OnCreateNewInventoryItem != null) | ||
379 | { | ||
380 | this.OnCreateNewInventoryItem(this, createItem.InventoryBlock.TransactionID, createItem.InventoryBlock.FolderID, createItem.InventoryBlock.CallbackID, | ||
381 | Util.FieldToString(createItem.InventoryBlock.Description), Util.FieldToString(createItem.InventoryBlock.Name), createItem.InventoryBlock.InvType, | ||
382 | createItem.InventoryBlock.Type, createItem.InventoryBlock.WearableType, createItem.InventoryBlock.NextOwnerMask); | ||
383 | } | ||
384 | } | 383 | } |
385 | break; | 384 | break; |
386 | case PacketType.FetchInventory: | 385 | case PacketType.FetchInventory: |
@@ -558,7 +557,7 @@ namespace OpenSim.Region.ClientStack | |||
558 | if (OnParcelPropertiesUpdateRequest != null) | 557 | if (OnParcelPropertiesUpdateRequest != null) |
559 | { | 558 | { |
560 | OnParcelPropertiesUpdateRequest(updatePacket, this); | 559 | OnParcelPropertiesUpdateRequest(updatePacket, this); |
561 | 560 | ||
562 | } | 561 | } |
563 | break; | 562 | break; |
564 | case PacketType.ParcelSelectObjects: | 563 | case PacketType.ParcelSelectObjects: |