diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index d47e068..e548f36 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -759,8 +759,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
759 | sbyte assetType, | 759 | sbyte assetType, |
760 | byte wearableType, uint nextOwnerMask, int creationDate) | 760 | byte wearableType, uint nextOwnerMask, int creationDate) |
761 | { | 761 | { |
762 | // m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); | 762 | m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); |
763 | 763 | ||
764 | if (!ExternalChecks.ExternalChecksCanCreateAvatarInventory(invType, remoteClient.AgentId)) | ||
765 | return; | ||
766 | |||
764 | if (transactionID == UUID.Zero) | 767 | if (transactionID == UUID.Zero) |
765 | { | 768 | { |
766 | CachedUserInfo userInfo | 769 | CachedUserInfo userInfo |
@@ -771,14 +774,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
771 | ScenePresence presence; | 774 | ScenePresence presence; |
772 | TryGetAvatar(remoteClient.AgentId, out presence); | 775 | TryGetAvatar(remoteClient.AgentId, out presence); |
773 | byte[] data = null; | 776 | byte[] data = null; |
777 | |||
774 | if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum | 778 | if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum |
775 | { | 779 | { |
776 | Vector3 pos=presence.AbsolutePosition; | 780 | Vector3 pos = presence.AbsolutePosition; |
777 | string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", | 781 | string strdata = String.Format( |
782 | "Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", | ||
778 | presence.Scene.RegionInfo.RegionID, | 783 | presence.Scene.RegionInfo.RegionID, |
779 | pos.X, pos.Y, pos.Z, | 784 | pos.X, pos.Y, pos.Z, |
780 | presence.RegionHandle); | 785 | presence.RegionHandle); |
781 | data=Encoding.ASCII.GetBytes(strdata); | 786 | data = Encoding.ASCII.GetBytes(strdata); |
782 | } | 787 | } |
783 | 788 | ||
784 | AssetBase asset = CreateAsset(name, description, assetType, data); | 789 | AssetBase asset = CreateAsset(name, description, assetType, data); |
@@ -1245,9 +1250,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1245 | if (part != null) | 1250 | if (part != null) |
1246 | { | 1251 | { |
1247 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)) | 1252 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)) |
1248 | { | ||
1249 | return; | 1253 | return; |
1250 | } | ||
1251 | 1254 | ||
1252 | TaskInventoryItem currentItem = part.GetInventoryItem(itemID); | 1255 | TaskInventoryItem currentItem = part.GetInventoryItem(itemID); |
1253 | 1256 | ||
@@ -1344,9 +1347,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1344 | if (part != null) | 1347 | if (part != null) |
1345 | { | 1348 | { |
1346 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)) | 1349 | if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)) |
1347 | { | ||
1348 | return; | 1350 | return; |
1349 | } | ||
1350 | 1351 | ||
1351 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); | 1352 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); |
1352 | // TODO: switch to posting on_rez here when scripts | 1353 | // TODO: switch to posting on_rez here when scripts |
@@ -1573,7 +1574,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1573 | //If they can take, they can delete! | 1574 | //If they can take, they can delete! |
1574 | permissionToDelete = permissionToTake; | 1575 | permissionToDelete = permissionToTake; |
1575 | } | 1576 | } |
1576 | |||
1577 | else if (destination == 6) //Delete | 1577 | else if (destination == 6) //Delete |
1578 | { | 1578 | { |
1579 | permissionToTake = | 1579 | permissionToTake = |