diff options
author | Melanie | 2012-07-28 00:39:36 +0100 |
---|---|---|
committer | Melanie | 2012-07-28 00:39:36 +0100 |
commit | 771d79e83e9ef5686aee5fe1c572673cff291083 (patch) | |
tree | b37749fc1929ffd6dd1b9c2c4e29120accf26b99 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | LSL/OSSL lacks Math.Min & Math.Max implementations. (diff) | |
download | opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.zip opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.gz opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.bz2 opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Monitoring/BaseStatsCollector.cs
OpenSim/Region/Application/OpenSim.cs
OpenSim/Region/Application/OpenSimBase.cs
OpenSim/Region/Framework/Scenes/SceneManager.cs
bin/OpenMetaverse.Rendering.Meshmerizer.dll
bin/OpenMetaverse.StructuredData.dll
bin/OpenMetaverse.dll
bin/OpenMetaverseTypes.dll
prebuild.xml
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 69 |
1 files changed, 46 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 98b8fcc..672d95a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -811,16 +811,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
811 | && oldAgentID == LibraryService.LibraryRootFolder.Owner)) | 811 | && oldAgentID == LibraryService.LibraryRootFolder.Owner)) |
812 | { | 812 | { |
813 | CreateNewInventoryItem( | 813 | CreateNewInventoryItem( |
814 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 814 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, |
815 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 815 | newName, item.Description, item.Flags, callbackID, asset, (sbyte)item.InvType, |
816 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, | ||
817 | item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | ||
816 | } | 818 | } |
817 | else | 819 | else |
818 | { | 820 | { |
819 | // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. | 821 | // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. |
820 | if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) && (m_permissions.BypassPermissions() || m_permissions.CanCopyUserInventory(remoteClient.AgentId, oldItemID))) | 822 | if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) |
823 | && (m_permissions.BypassPermissions() | ||
824 | || m_permissions.CanCopyUserInventory(remoteClient.AgentId, oldItemID))) | ||
821 | { | 825 | { |
822 | CreateNewInventoryItem( | 826 | CreateNewInventoryItem( |
823 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, | 827 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Description, item.Flags, callbackID, |
824 | asset, (sbyte) item.InvType, | 828 | asset, (sbyte) item.InvType, |
825 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, | 829 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, |
826 | item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 830 | item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
@@ -885,32 +889,50 @@ namespace OpenSim.Region.Framework.Scenes | |||
885 | /// <summary> | 889 | /// <summary> |
886 | /// Create a new inventory item. | 890 | /// Create a new inventory item. |
887 | /// </summary> | 891 | /// </summary> |
888 | /// <param name="remoteClient"></param> | 892 | /// <param name="remoteClient">Client creating this inventory item.</param> |
889 | /// <param name="folderID"></param> | 893 | /// <param name="creatorID"></param> |
890 | /// <param name="callbackID"></param> | 894 | /// <param name="creatorData"></param> |
891 | /// <param name="asset"></param> | 895 | /// <param name="folderID">UUID of folder in which this item should be placed.</param> |
892 | /// <param name="invType"></param> | 896 | /// <param name="name">Item name.</para> |
893 | /// <param name="nextOwnerMask"></param> | 897 | /// <param name="description">Item description.</param> |
894 | public void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, | 898 | /// <param name="flags">Item flags</param> |
895 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) | 899 | /// <param name="callbackID">Generated by the client.</para> |
900 | /// <param name="asset">Asset to which this item refers.</param> | ||
901 | /// <param name="invType">Type of inventory item.</param> | ||
902 | /// <param name="nextOwnerMask">Next owner pemrissions mask.</param> | ||
903 | /// <param name="creationDate">Unix timestamp at which this item was created.</param> | ||
904 | public void CreateNewInventoryItem( | ||
905 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, | ||
906 | string name, string description, uint flags, uint callbackID, | ||
907 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) | ||
896 | { | 908 | { |
897 | CreateNewInventoryItem( | 909 | CreateNewInventoryItem( |
898 | remoteClient, creatorID, creatorData, folderID, name, flags, callbackID, asset, invType, | 910 | remoteClient, creatorID, creatorData, folderID, name, description, flags, callbackID, asset, invType, |
899 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); | 911 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); |
900 | } | 912 | } |
901 | 913 | ||
902 | /// <summary> | 914 | /// <summary> |
903 | /// Create a new Inventory Item | 915 | /// Create a new Inventory Item |
904 | /// </summary> | 916 | /// </summary> |
905 | /// <param name="remoteClient"></param> | 917 | /// <param name="remoteClient">Client creating this inventory item.</param> |
906 | /// <param name="folderID"></param> | 918 | /// <param name="creatorID"></param> |
907 | /// <param name="callbackID"></param> | 919 | /// <param name="creatorData"></param> |
908 | /// <param name="asset"></param> | 920 | /// <param name="folderID">UUID of folder in which this item should be placed.</param> |
909 | /// <param name="invType"></param> | 921 | /// <param name="name">Item name.</para> |
910 | /// <param name="nextOwnerMask"></param> | 922 | /// <param name="description">Item description.</param> |
911 | /// <param name="creationDate"></param> | 923 | /// <param name="flags">Item flags</param> |
924 | /// <param name="callbackID">Generated by the client.</para> | ||
925 | /// <param name="asset">Asset to which this item refers.</param> | ||
926 | /// <param name="invType">Type of inventory item.</param> | ||
927 | /// <param name="baseMask">Base permissions mask.</param> | ||
928 | /// <param name="currentMask">Current permissions mask.</param> | ||
929 | /// <param name="everyoneMask">Everyone permissions mask.</param> | ||
930 | /// <param name="nextOwnerMask">Next owner pemrissions mask.</param> | ||
931 | /// <param name="groupMask">Group permissions mask.</param> | ||
932 | /// <param name="creationDate">Unix timestamp at which this item was created.</param> | ||
912 | private void CreateNewInventoryItem( | 933 | private void CreateNewInventoryItem( |
913 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, | 934 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, |
935 | string name, string description, uint flags, uint callbackID, AssetBase asset, sbyte invType, | ||
914 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) | 936 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) |
915 | { | 937 | { |
916 | InventoryItemBase item = new InventoryItemBase(); | 938 | InventoryItemBase item = new InventoryItemBase(); |
@@ -919,8 +941,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
919 | item.CreatorData = creatorData; | 941 | item.CreatorData = creatorData; |
920 | item.ID = UUID.Random(); | 942 | item.ID = UUID.Random(); |
921 | item.AssetID = asset.FullID; | 943 | item.AssetID = asset.FullID; |
922 | item.Description = asset.Description; | ||
923 | item.Name = name; | 944 | item.Name = name; |
945 | item.Description = description; | ||
924 | item.Flags = flags; | 946 | item.Flags = flags; |
925 | item.AssetType = asset.Type; | 947 | item.AssetType = asset.Type; |
926 | item.InvType = invType; | 948 | item.InvType = invType; |
@@ -1002,7 +1024,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1002 | asset.Description = description; | 1024 | asset.Description = description; |
1003 | 1025 | ||
1004 | CreateNewInventoryItem( | 1026 | CreateNewInventoryItem( |
1005 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, | 1027 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, |
1028 | name, description, 0, callbackID, asset, invType, | ||
1006 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | 1029 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, |
1007 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 1030 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); |
1008 | } | 1031 | } |