diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c98629b..2800e9e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -193,11 +193,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); | 193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); |
194 | CommsManager.AssetCache.AddAsset(asset); | 194 | CommsManager.AssetCache.AddAsset(asset); |
195 | 195 | ||
196 | item.AssetID = asset.Metadata.FullID; | 196 | item.AssetID = asset.FullID; |
197 | userInfo.UpdateItem(item); | 197 | userInfo.UpdateItem(item); |
198 | 198 | ||
199 | // remoteClient.SendInventoryItemCreateUpdate(item); | 199 | // remoteClient.SendInventoryItemCreateUpdate(item); |
200 | return (asset.Metadata.FullID); | 200 | return (asset.FullID); |
201 | } | 201 | } |
202 | } | 202 | } |
203 | } | 203 | } |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
285 | } | 285 | } |
286 | 286 | ||
287 | // Update item with new asset | 287 | // Update item with new asset |
288 | item.AssetID = asset.Metadata.FullID; | 288 | item.AssetID = asset.FullID; |
289 | group.UpdateInventoryItem(item); | 289 | group.UpdateInventoryItem(item); |
290 | part.GetProperties(remoteClient); | 290 | part.GetProperties(remoteClient); |
291 | 291 | ||
@@ -688,7 +688,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
688 | { | 688 | { |
689 | if (newName != String.Empty) | 689 | if (newName != String.Empty) |
690 | { | 690 | { |
691 | asset.Metadata.Name = newName; | 691 | asset.Name = newName; |
692 | } | 692 | } |
693 | else | 693 | else |
694 | { | 694 | { |
@@ -728,10 +728,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
728 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) | 728 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) |
729 | { | 729 | { |
730 | AssetBase asset = new AssetBase(); | 730 | AssetBase asset = new AssetBase(); |
731 | asset.Metadata.Name = name; | 731 | asset.Name = name; |
732 | asset.Metadata.Description = description; | 732 | asset.Description = description; |
733 | asset.Metadata.Type = assetType; | 733 | asset.Type = assetType; |
734 | asset.Metadata.FullID = UUID.Random(); | 734 | asset.FullID = UUID.Random(); |
735 | asset.Data = (data == null) ? new byte[1] : data; | 735 | asset.Data = (data == null) ? new byte[1] : data; |
736 | 736 | ||
737 | return asset; | 737 | return asset; |
@@ -831,11 +831,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
831 | item.Owner = remoteClient.AgentId; | 831 | item.Owner = remoteClient.AgentId; |
832 | item.Creator = remoteClient.AgentId; | 832 | item.Creator = remoteClient.AgentId; |
833 | item.ID = UUID.Random(); | 833 | item.ID = UUID.Random(); |
834 | item.AssetID = asset.Metadata.FullID; | 834 | item.AssetID = asset.FullID; |
835 | item.Description = asset.Metadata.Description; | 835 | item.Description = asset.Description; |
836 | item.Name = name; | 836 | item.Name = name; |
837 | item.Flags = flags; | 837 | item.Flags = flags; |
838 | item.AssetType = asset.Metadata.Type; | 838 | item.AssetType = asset.Type; |
839 | item.InvType = invType; | 839 | item.InvType = invType; |
840 | item.Folder = folderID; | 840 | item.Folder = folderID; |
841 | item.CurrentPermissions = currentMask; | 841 | item.CurrentPermissions = currentMask; |
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
905 | AssetBase asset = CreateAsset(name, description, assetType, data); | 905 | AssetBase asset = CreateAsset(name, description, assetType, data); |
906 | CommsManager.AssetCache.AddAsset(asset); | 906 | CommsManager.AssetCache.AddAsset(asset); |
907 | 907 | ||
908 | CreateNewInventoryItem(remoteClient, folderID, asset.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); | 908 | CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
909 | } | 909 | } |
910 | else | 910 | else |
911 | { | 911 | { |
@@ -1553,7 +1553,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1553 | taskItem.Flags = itemBase.Flags; | 1553 | taskItem.Flags = itemBase.Flags; |
1554 | taskItem.PermsGranter = UUID.Zero; | 1554 | taskItem.PermsGranter = UUID.Zero; |
1555 | taskItem.PermsMask = 0; | 1555 | taskItem.PermsMask = 0; |
1556 | taskItem.AssetID = asset.Metadata.FullID; | 1556 | taskItem.AssetID = asset.FullID; |
1557 | 1557 | ||
1558 | part.Inventory.AddInventoryItem(taskItem, false); | 1558 | part.Inventory.AddInventoryItem(taskItem, false); |
1559 | part.GetProperties(remoteClient); | 1559 | part.GetProperties(remoteClient); |
@@ -1953,16 +1953,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1953 | (sbyte)AssetType.Object, | 1953 | (sbyte)AssetType.Object, |
1954 | Utils.StringToBytes(sceneObjectXml)); | 1954 | Utils.StringToBytes(sceneObjectXml)); |
1955 | CommsManager.AssetCache.AddAsset(asset); | 1955 | CommsManager.AssetCache.AddAsset(asset); |
1956 | assetID = asset.Metadata.FullID; | 1956 | assetID = asset.FullID; |
1957 | 1957 | ||
1958 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 1958 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
1959 | { | 1959 | { |
1960 | item.AssetID = asset.Metadata.FullID; | 1960 | item.AssetID = asset.FullID; |
1961 | userInfo.UpdateItem(item); | 1961 | userInfo.UpdateItem(item); |
1962 | } | 1962 | } |
1963 | else | 1963 | else |
1964 | { | 1964 | { |
1965 | item.AssetID = asset.Metadata.FullID; | 1965 | item.AssetID = asset.FullID; |
1966 | 1966 | ||
1967 | if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions()) | 1967 | if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions()) |
1968 | { | 1968 | { |
@@ -1995,9 +1995,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1995 | 1995 | ||
1996 | // TODO: add the new fields (Flags, Sale info, etc) | 1996 | // TODO: add the new fields (Flags, Sale info, etc) |
1997 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 1997 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
1998 | item.Description = asset.Metadata.Description; | 1998 | item.Description = asset.Description; |
1999 | item.Name = asset.Metadata.Name; | 1999 | item.Name = asset.Name; |
2000 | item.AssetType = asset.Metadata.Type; | 2000 | item.AssetType = asset.Type; |
2001 | 2001 | ||
2002 | userInfo.AddItem(item); | 2002 | userInfo.AddItem(item); |
2003 | 2003 | ||
@@ -2080,10 +2080,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2080 | Utils.StringToBytes(sceneObjectXml)); | 2080 | Utils.StringToBytes(sceneObjectXml)); |
2081 | CommsManager.AssetCache.AddAsset(asset); | 2081 | CommsManager.AssetCache.AddAsset(asset); |
2082 | 2082 | ||
2083 | item.AssetID = asset.Metadata.FullID; | 2083 | item.AssetID = asset.FullID; |
2084 | item.Description = asset.Metadata.Description; | 2084 | item.Description = asset.Description; |
2085 | item.Name = asset.Metadata.Name; | 2085 | item.Name = asset.Name; |
2086 | item.AssetType = asset.Metadata.Type; | 2086 | item.AssetType = asset.Type; |
2087 | item.InvType = (int)InventoryType.Object; | 2087 | item.InvType = (int)InventoryType.Object; |
2088 | item.Folder = foundFolder; | 2088 | item.Folder = foundFolder; |
2089 | 2089 | ||
@@ -2121,10 +2121,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2121 | item.Creator = grp.RootPart.CreatorID; | 2121 | item.Creator = grp.RootPart.CreatorID; |
2122 | item.Owner = remoteClient.AgentId; | 2122 | item.Owner = remoteClient.AgentId; |
2123 | item.ID = UUID.Random(); | 2123 | item.ID = UUID.Random(); |
2124 | item.AssetID = asset.Metadata.FullID; | 2124 | item.AssetID = asset.FullID; |
2125 | item.Description = asset.Metadata.Description; | 2125 | item.Description = asset.Description; |
2126 | item.Name = asset.Metadata.Name; | 2126 | item.Name = asset.Name; |
2127 | item.AssetType = asset.Metadata.Type; | 2127 | item.AssetType = asset.Type; |
2128 | item.InvType = (int)InventoryType.Object; | 2128 | item.InvType = (int)InventoryType.Object; |
2129 | 2129 | ||
2130 | item.Folder = UUID.Zero; // Objects folder! | 2130 | item.Folder = UUID.Zero; // Objects folder! |