diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 782d5b4..cbb3a7d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -988,17 +988,28 @@ namespace OpenSim.Region.Environment.Scenes | |||
988 | } | 988 | } |
989 | if (selectedEnt != null) | 989 | if (selectedEnt != null) |
990 | { | 990 | { |
991 | bool permission; | 991 | bool permissionToTake = false; |
992 | if (DeRezPacket.AgentBlock.Destination == 1) | 992 | bool permissionToDelete = false; |
993 | { // Take Copy | 993 | if (DeRezPacket.AgentBlock.Destination == 1)// Take Copy |
994 | permission = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | 994 | { |
995 | permissionToTake = ExternalChecks.ExternalChecksCanTakeCopyObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | ||
996 | permissionToDelete = false; //Just taking copy! | ||
997 | |||
995 | } | 998 | } |
996 | else | 999 | else if(DeRezPacket.AgentBlock.Destination == 4) //Take |
997 | { // Take | 1000 | { |
998 | permission = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | 1001 | // Take |
1002 | permissionToTake = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | ||
1003 | permissionToDelete = permissionToTake; //If they can take, they can delete! | ||
1004 | } | ||
1005 | |||
1006 | else if (DeRezPacket.AgentBlock.Destination == 6) //Delete | ||
1007 | { | ||
1008 | permissionToTake = false; | ||
1009 | permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); | ||
999 | } | 1010 | } |
1000 | 1011 | ||
1001 | if (permission) | 1012 | if (permissionToTake) |
1002 | { | 1013 | { |
1003 | SceneObjectGroup objectGroup = (SceneObjectGroup) selectedEnt; | 1014 | SceneObjectGroup objectGroup = (SceneObjectGroup) selectedEnt; |
1004 | string sceneObjectXml = objectGroup.ToXmlString(); | 1015 | string sceneObjectXml = objectGroup.ToXmlString(); |
@@ -1044,8 +1055,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1044 | remoteClient.SendInventoryItemCreateUpdate(item); | 1055 | remoteClient.SendInventoryItemCreateUpdate(item); |
1045 | } | 1056 | } |
1046 | 1057 | ||
1047 | // FIXME: Nasty hardcoding. If Destination is 1 then client wants us to take a copy | 1058 | if (permissionToDelete) |
1048 | if (DeRezPacket.AgentBlock.Destination != 1) | ||
1049 | { | 1059 | { |
1050 | DeleteSceneObjectGroup(objectGroup); | 1060 | DeleteSceneObjectGroup(objectGroup); |
1051 | } | 1061 | } |