diff options
Merge branch 'master' into careminster-presence-refactor
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 1d8b988..36ce245 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -408,6 +408,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
408 | InventoryItemBase itemCopy = new InventoryItemBase(); | 408 | InventoryItemBase itemCopy = new InventoryItemBase(); |
409 | itemCopy.Owner = recipient; | 409 | itemCopy.Owner = recipient; |
410 | itemCopy.CreatorId = item.CreatorId; | 410 | itemCopy.CreatorId = item.CreatorId; |
411 | itemCopy.CreatorData = item.CreatorData; | ||
411 | itemCopy.ID = UUID.Random(); | 412 | itemCopy.ID = UUID.Random(); |
412 | itemCopy.AssetID = item.AssetID; | 413 | itemCopy.AssetID = item.AssetID; |
413 | itemCopy.Description = item.Description; | 414 | itemCopy.Description = item.Description; |
@@ -683,13 +684,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
683 | if (remoteClient.AgentId == oldAgentID) | 684 | if (remoteClient.AgentId == oldAgentID) |
684 | { | 685 | { |
685 | CreateNewInventoryItem( | 686 | CreateNewInventoryItem( |
686 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 687 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
687 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 688 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
688 | } | 689 | } |
689 | else | 690 | else |
690 | { | 691 | { |
691 | CreateNewInventoryItem( | 692 | CreateNewInventoryItem( |
692 | remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, | 693 | remoteClient, item.CreatorId, item.CreatorData, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, |
693 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); | 694 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); |
694 | } | 695 | } |
695 | } | 696 | } |
@@ -757,11 +758,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
757 | /// <param name="asset"></param> | 758 | /// <param name="asset"></param> |
758 | /// <param name="invType"></param> | 759 | /// <param name="invType"></param> |
759 | /// <param name="nextOwnerMask"></param> | 760 | /// <param name="nextOwnerMask"></param> |
760 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, | 761 | private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, |
761 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) | 762 | AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) |
762 | { | 763 | { |
763 | CreateNewInventoryItem( | 764 | CreateNewInventoryItem( |
764 | remoteClient, creatorID, folderID, name, flags, callbackID, asset, invType, | 765 | remoteClient, creatorID, creatorData, folderID, name, flags, callbackID, asset, invType, |
765 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); | 766 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); |
766 | } | 767 | } |
767 | 768 | ||
@@ -776,12 +777,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
776 | /// <param name="nextOwnerMask"></param> | 777 | /// <param name="nextOwnerMask"></param> |
777 | /// <param name="creationDate"></param> | 778 | /// <param name="creationDate"></param> |
778 | private void CreateNewInventoryItem( | 779 | private void CreateNewInventoryItem( |
779 | IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, | 780 | IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, |
780 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) | 781 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) |
781 | { | 782 | { |
782 | InventoryItemBase item = new InventoryItemBase(); | 783 | InventoryItemBase item = new InventoryItemBase(); |
783 | item.Owner = remoteClient.AgentId; | 784 | item.Owner = remoteClient.AgentId; |
784 | item.CreatorId = creatorID; | 785 | item.CreatorId = creatorID; |
786 | item.CreatorData = creatorData; | ||
785 | item.ID = UUID.Random(); | 787 | item.ID = UUID.Random(); |
786 | item.AssetID = asset.FullID; | 788 | item.AssetID = asset.FullID; |
787 | item.Description = asset.Description; | 789 | item.Description = asset.Description; |
@@ -861,7 +863,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
861 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); | 863 | AssetBase asset = CreateAsset(name, description, assetType, data, remoteClient.AgentId); |
862 | AssetService.Store(asset); | 864 | AssetService.Store(asset); |
863 | 865 | ||
864 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); | 866 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
865 | } | 867 | } |
866 | else | 868 | else |
867 | { | 869 | { |
@@ -903,7 +905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
903 | asset.Description = description; | 905 | asset.Description = description; |
904 | 906 | ||
905 | CreateNewInventoryItem( | 907 | CreateNewInventoryItem( |
906 | remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, | 908 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, |
907 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | 909 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, |
908 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 910 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); |
909 | } | 911 | } |
@@ -1031,6 +1033,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1031 | 1033 | ||
1032 | agentItem.ID = UUID.Random(); | 1034 | agentItem.ID = UUID.Random(); |
1033 | agentItem.CreatorId = taskItem.CreatorID.ToString(); | 1035 | agentItem.CreatorId = taskItem.CreatorID.ToString(); |
1036 | agentItem.CreatorData = taskItem.CreatorData; | ||
1034 | agentItem.Owner = destAgent; | 1037 | agentItem.Owner = destAgent; |
1035 | agentItem.AssetID = taskItem.AssetID; | 1038 | agentItem.AssetID = taskItem.AssetID; |
1036 | agentItem.Description = taskItem.Description; | 1039 | agentItem.Description = taskItem.Description; |
@@ -1232,6 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1232 | 1235 | ||
1233 | destTaskItem.ItemID = UUID.Random(); | 1236 | destTaskItem.ItemID = UUID.Random(); |
1234 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1237 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1238 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1235 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1239 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1236 | destTaskItem.GroupID = destPart.GroupID; | 1240 | destTaskItem.GroupID = destPart.GroupID; |
1237 | destTaskItem.OwnerID = destPart.OwnerID; | 1241 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1637,6 +1641,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1637 | 1641 | ||
1638 | destTaskItem.ItemID = UUID.Random(); | 1642 | destTaskItem.ItemID = UUID.Random(); |
1639 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1643 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1644 | destTaskItem.CreatorData = srcTaskItem.CreatorData; | ||
1640 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1645 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1641 | destTaskItem.GroupID = destPart.GroupID; | 1646 | destTaskItem.GroupID = destPart.GroupID; |
1642 | destTaskItem.OwnerID = destPart.OwnerID; | 1647 | destTaskItem.OwnerID = destPart.OwnerID; |
@@ -1873,6 +1878,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1873 | 1878 | ||
1874 | InventoryItemBase item = new InventoryItemBase(); | 1879 | InventoryItemBase item = new InventoryItemBase(); |
1875 | item.CreatorId = grp.RootPart.CreatorID.ToString(); | 1880 | item.CreatorId = grp.RootPart.CreatorID.ToString(); |
1881 | item.CreatorData = grp.RootPart.CreatorData; | ||
1876 | item.Owner = remoteClient.AgentId; | 1882 | item.Owner = remoteClient.AgentId; |
1877 | item.ID = UUID.Random(); | 1883 | item.ID = UUID.Random(); |
1878 | item.AssetID = asset.FullID; | 1884 | item.AssetID = asset.FullID; |