aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/SimClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r--OpenSim.RegionServer/SimClient.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs
index ec6d3dc..9411dac 100644
--- a/OpenSim.RegionServer/SimClient.cs
+++ b/OpenSim.RegionServer/SimClient.cs
@@ -341,6 +341,10 @@ namespace OpenSim
341 { 341 {
342 this.UploadAssets.CreateInventoryItem(createItem); 342 this.UploadAssets.CreateInventoryItem(createItem);
343 } 343 }
344 else
345 {
346 this.CreateInventoryItem(createItem);
347 }
344 break; 348 break;
345 case PacketType.FetchInventory: 349 case PacketType.FetchInventory:
346 //Console.WriteLine("fetch item packet"); 350 //Console.WriteLine("fetch item packet");
@@ -735,5 +739,26 @@ namespace OpenSim
735 } 739 }
736 return inventory; 740 return inventory;
737 } 741 }
742
743 private void CreateInventoryItem(CreateInventoryItemPacket packet)
744 {
745 if (packet.InventoryBlock.Type == 7)
746 {
747 Console.WriteLine(packet.ToString());
748 this.debug = true;
749 //lets try this out with creating a notecard
750 AssetBase asset = new AssetBase();
751 asset.Name = Helpers.FieldToString(packet.InventoryBlock.Name);
752 asset.Description = Helpers.FieldToString(packet.InventoryBlock.Description);
753 asset.InvType = packet.InventoryBlock.InvType;
754 asset.Type = packet.InventoryBlock.Type;
755 asset.FullID = LLUUID.Random();
756 asset.Data = new byte[0];
757 Console.WriteLine("created new notecard with asset : " + asset.FullID.ToStringHyphenated());
758
759 m_assetCache.AddAsset(asset);
760 m_inventoryCache.AddNewInventoryItem(this, packet.InventoryBlock.FolderID, asset);
761 }
762 }
738 } 763 }
739} 764}