aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/SimClient.cs
diff options
context:
space:
mode:
authorMW2007-03-30 11:09:51 +0000
committerMW2007-03-30 11:09:51 +0000
commit00579d3581cc2c16657fd64c488835b9630fefb5 (patch)
treec369a62a1c4eb10e4bee9377849f442aef991de0 /OpenSim.RegionServer/SimClient.cs
parentStarted to add a few features to the web front end that should be useful duri... (diff)
downloadopensim-SC_OLD-00579d3581cc2c16657fd64c488835b9630fefb5.zip
opensim-SC_OLD-00579d3581cc2c16657fd64c488835b9630fefb5.tar.gz
opensim-SC_OLD-00579d3581cc2c16657fd64c488835b9630fefb5.tar.bz2
opensim-SC_OLD-00579d3581cc2c16657fd64c488835b9630fefb5.tar.xz
Should now be able to create and edit Notecards
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}