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/Environment/Scenes | |
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/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 60 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 1 |
3 files changed, 37 insertions, 27 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 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3ee1f19..378acf9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -577,6 +577,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
577 | CreateAndAddScenePresence(client); | 577 | CreateAndAddScenePresence(client); |
578 | m_LandManager.sendParcelOverlay(client); | 578 | m_LandManager.sendParcelOverlay(client); |
579 | commsManager.UserProfiles.AddNewUser(client.AgentId); | 579 | commsManager.UserProfiles.AddNewUser(client.AgentId); |
580 | commsManager.TransactionsManager.AddUser(client.AgentId); | ||
580 | } | 581 | } |
581 | 582 | ||
582 | protected virtual void SubscribeToClientEvents(IClientAPI client) | 583 | protected virtual void SubscribeToClientEvents(IClientAPI client) |
@@ -625,6 +626,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
625 | client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; | 626 | client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; |
626 | client.OnRequestTaskInventory += RequestTaskInventory; | 627 | client.OnRequestTaskInventory += RequestTaskInventory; |
627 | client.OnFetchInventory += commsManager.UserProfiles.HandleFetchInventory; | 628 | client.OnFetchInventory += commsManager.UserProfiles.HandleFetchInventory; |
629 | client.OnAssetUploadRequest += commsManager.TransactionsManager.HandleUDPUploadRequest; | ||
630 | client.OnXferReceive += commsManager.TransactionsManager.HandleXfer; | ||
628 | 631 | ||
629 | client.OnGrabObject += ProcessObjectGrab; | 632 | client.OnGrabObject += ProcessObjectGrab; |
630 | } | 633 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 7a1f117..3bd83aa 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -706,7 +706,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
706 | } | 706 | } |
707 | } | 707 | } |
708 | } | 708 | } |
709 | |||
710 | #endregion | 709 | #endregion |
711 | /// <summary> | 710 | /// <summary> |
712 | /// | 711 | /// |