diff options
author | Jonathan Freedman | 2010-11-21 20:01:48 -0800 |
---|---|---|
committer | Jonathan Freedman | 2010-11-21 20:01:48 -0800 |
commit | b7f5e8284360f92e0e102b9546076573c57d9397 (patch) | |
tree | 132663da8c1882e524241b55a739ef2758ef8958 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Merge https://github.com/opensim/opensim into mantis5110 (diff) | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
download | opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.zip opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.gz opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.bz2 opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.xz |
Merge branch 'master-core' into mantis5110
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4cc797b..a29b7f1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -426,6 +426,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
426 | InventoryItemBase itemCopy = new InventoryItemBase(); | 426 | InventoryItemBase itemCopy = new InventoryItemBase(); |
427 | itemCopy.Owner = recipient; | 427 | itemCopy.Owner = recipient; |
428 | itemCopy.CreatorId = item.CreatorId; | 428 | itemCopy.CreatorId = item.CreatorId; |
429 | itemCopy.CreatorData = item.CreatorData; | ||
429 | itemCopy.ID = UUID.Random(); | 430 | itemCopy.ID = UUID.Random(); |
430 | itemCopy.AssetID = item.AssetID; | 431 | itemCopy.AssetID = item.AssetID; |
431 | itemCopy.Description = item.Description; | 432 | itemCopy.Description = item.Description; |
@@ -699,13 +700,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
699 | if (remoteClient.AgentId == oldAgentID) | 700 | if (remoteClient.AgentId == oldAgentID) |
700 | { | 701 | { |
701 | CreateNewInventoryItem( | 702 | CreateNewInventoryItem( |
702 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 703 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
703 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 704 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
704 | } | 705 | } |
705 | else | 706 | else |
706 | { | 707 | { |
707 | CreateNewInventoryItem( | 708 | CreateNewInventoryItem( |
708 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 709 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
709 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 710 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
710 | } | 711 | } |
711 | } | 712 | } |
@@ -755,11 +756,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
755 | /// <param name="asset"></param> | 756 | /// <param name="asset"></param> |
756 | /// <param name="invType"></param> | 757 | /// <param name="invType"></param> |
757 | /// <param name="nextOwnerMask"></param> | 758 | /// <param name="nextOwnerMask"></param> |
758 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, | 759 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, |
759 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) | 760 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) |
760 | { | 761 | { |
761 | CreateNewInventoryItem( | 762 | CreateNewInventoryItem( |
762 | remoteClient, creatorID, folderID, name, flags, callbackID, asset, invType, | 763 | remoteClient, creatorID, creatorData, folderID, name, flags, callbackID, asset, invType, |
763 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); | 764 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); |
764 | } | 765 | } |
765 | 766 | ||
@@ -774,12 +775,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
774 | /// <param name="nextOwnerMask"></param> | 775 | /// <param name="nextOwnerMask"></param> |
775 | /// <param name="creationDate"></param> | 776 | /// <param name="creationDate"></param> |
776 | private void CreateNewInventoryItem( | 777 | private void CreateNewInventoryItem( |
777 | IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, | 778 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, |
778 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) | 779 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) |
779 | { | 780 | { |
780 | InventoryItemBase item = new InventoryItemBase(); | 781 | InventoryItemBase item = new InventoryItemBase(); |
781 | item.Owner = remoteClient.AgentId; | 782 | item.Owner = remoteClient.AgentId; |
782 | item.CreatorId = creatorID; | 783 | item.CreatorId = creatorID; |
784 | item.CreatorData = creatorData; | ||
783 | item.ID = UUID.Random(); | 785 | item.ID = UUID.Random(); |
784 | item.AssetID = asset.FullID; | 786 | item.AssetID = asset.FullID; |
785 | item.Description = asset.Description; | 787 | item.Description = asset.Description; |
@@ -859,7 +861,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
859 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); | 861 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); |
860 | AssetService.Store(asset); | 862 | AssetService.Store(asset); |
861 | 863 | ||
862 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); | 864 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
863 | } | 865 | } |
864 | else | 866 | else |
865 | { | 867 | { |
@@ -901,7 +903,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
901 | asset.Description = description; | 903 | asset.Description = description; |
902 | 904 | ||
903 | CreateNewInventoryItem( | 905 | CreateNewInventoryItem( |
904 | remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, | 906 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, |
905 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | 907 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, |
906 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 908 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); |
907 | } | 909 | } |
@@ -1025,6 +1027,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1025 | 1027 | ||
1026 | agentItem.ID = UUID.Random(); | 1028 | agentItem.ID = UUID.Random(); |
1027 | agentItem.CreatorId = taskItem.CreatorID.ToString(); | 1029 | agentItem.CreatorId = taskItem.CreatorID.ToString(); |
1030 | agentItem.CreatorData = taskItem.CreatorData; | ||
1028 | agentItem.Owner = destAgent; | 1031 | agentItem.Owner = destAgent; |
1029 | agentItem.AssetID = taskItem.AssetID; | 1032 | agentItem.AssetID = taskItem.AssetID; |
1030 | agentItem.Description = taskItem.Description; | 1033 | agentItem.Description = taskItem.Description; |
@@ -1226,6 +1229,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1226 | 1229 | ||
1227 | destTaskItem.ItemID = UUID.Random(); | 1230 | destTaskItem.ItemID = UUID.Random(); |
1228 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1231 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1232 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1229 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1233 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1230 | destTaskItem.GroupID = destPart.GroupID; | 1234 | destTaskItem.GroupID = destPart.GroupID; |
1231 | destTaskItem.OwnerID = destPart.OwnerID; | 1235 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1638,6 +1642,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1638 | 1642 | ||
1639 | destTaskItem.ItemID = UUID.Random(); | 1643 | destTaskItem.ItemID = UUID.Random(); |
1640 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1644 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1645 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1641 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1646 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1642 | destTaskItem.GroupID = destPart.GroupID; | 1647 | destTaskItem.GroupID = destPart.GroupID; |
1643 | destTaskItem.OwnerID = destPart.OwnerID; | 1648 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1844,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1844 | 1849 | ||
1845 | InventoryItemBase item = new InventoryItemBase(); | 1850 | InventoryItemBase item = new InventoryItemBase(); |
1846 | item.CreatorId = grp.RootPart.CreatorID.ToString(); | 1851 | item.CreatorId = grp.RootPart.CreatorID.ToString(); |
1852 | item.CreatorData = grp.RootPart.CreatorData; | ||
1847 | item.Owner = remoteClient.AgentId; | 1853 | item.Owner = remoteClient.AgentId; |
1848 | item.ID = UUID.Random(); | 1854 | item.ID = UUID.Random(); |
1849 | item.AssetID = asset.FullID; | 1855 | item.AssetID = asset.FullID; |