aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorMW2007-08-15 18:34:36 +0000
committerMW2007-08-15 18:34:36 +0000
commit94dded470d04f72c573bf0aa82e1f7522362c54a (patch)
tree0ecb098a3b75a6b0fee01c21ca11c614a32bceef /OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
parent* We now have a field of spinning objects. (diff)
downloadopensim-SC_OLD-94dded470d04f72c573bf0aa82e1f7522362c54a.zip
opensim-SC_OLD-94dded470d04f72c573bf0aa82e1f7522362c54a.tar.gz
opensim-SC_OLD-94dded470d04f72c573bf0aa82e1f7522362c54a.tar.bz2
opensim-SC_OLD-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/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs60
1 files changed, 34 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index cca8998..afa4ea5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -714,33 +714,41 @@ namespace OpenSim.Region.Environment.Scenes
714 /// <param name="nextOwnerMask"></param> 714 /// <param name="nextOwnerMask"></param>
715 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) 715 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask)
716 { 716 {
717 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId); 717 if (transActionID == LLUUID.Zero)
718 if (userInfo != null)
719 { 718 {
720 AssetBase asset = new AssetBase(); 719 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId);
721 asset.Name = name; 720 if (userInfo != null)
722 asset.Description = description; 721 {
723 asset.InvType = invType; 722 AssetBase asset = new AssetBase();
724 asset.Type = type; 723 asset.Name = name;
725 asset.FullID = LLUUID.Random(); 724 asset.Description = description;
726 asset.Data = new byte[1]; 725 asset.InvType = invType;
727 this.assetCache.AddAsset(asset); 726 asset.Type = type;
728 727 asset.FullID = LLUUID.Random();
729 InventoryItemBase item = new InventoryItemBase(); 728 asset.Data = new byte[1];
730 item.avatarID = remoteClient.AgentId; 729 this.assetCache.AddAsset(asset);
731 item.creatorsID = remoteClient.AgentId; 730
732 item.inventoryID = LLUUID.Random(); 731 InventoryItemBase item = new InventoryItemBase();
733 item.assetID = asset.FullID; 732 item.avatarID = remoteClient.AgentId;
734 item.inventoryDescription = description; 733 item.creatorsID = remoteClient.AgentId;
735 item.inventoryName = name; 734 item.inventoryID = LLUUID.Random();
736 item.assetType = invType; 735 item.assetID = asset.FullID;
737 item.invType = invType; 736 item.inventoryDescription = description;
738 item.parentFolderID = folderID; 737 item.inventoryName = name;
739 item.inventoryCurrentPermissions = 2147483647; 738 item.assetType = invType;
740 item.inventoryNextPermissions = nextOwnerMask; 739 item.invType = invType;
741 740 item.parentFolderID = folderID;
742 userInfo.AddItem(remoteClient.AgentId, item); 741 item.inventoryCurrentPermissions = 2147483647;
743 remoteClient.SendInventoryItemUpdate(item); 742 item.inventoryNextPermissions = nextOwnerMask;
743
744 userInfo.AddItem(remoteClient.AgentId, item);
745 remoteClient.SendInventoryItemUpdate(item);
746 }
747 }
748 else
749 {
750 commsManager.TransactionsManager.HandleInventoryFromTransaction(remoteClient, transActionID, folderID, callbackID, description, name, invType, type, wearableType, nextOwnerMask);
751 //System.Console.WriteLine("request to create inventory item from transaction " + transActionID);
744 } 752 }
745 } 753 }
746 754