diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 36471e9..01a0fc8 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -3948,6 +3948,44 @@ namespace OpenSim.Region.Environment.Scenes | |||
3948 | public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID, | 3948 | public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID, |
3949 | uint localID, byte saleType) | 3949 | uint localID, byte saleType) |
3950 | { | 3950 | { |
3951 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
3952 | |||
3953 | if(part == null) | ||
3954 | return; | ||
3955 | |||
3956 | switch (saleType) | ||
3957 | { | ||
3958 | case 1: // Sell as original (in-place sale) | ||
3959 | if(part.ParentGroup == null) | ||
3960 | return; | ||
3961 | |||
3962 | part.ParentGroup.SetOwnerId(remoteClient.AgentId); | ||
3963 | part.ParentGroup.SetRootPartOwner(part, remoteClient.AgentId, | ||
3964 | remoteClient.ActiveGroupId); | ||
3965 | |||
3966 | List<SceneObjectPart> partList = | ||
3967 | new List<SceneObjectPart>(part.ParentGroup.Children.Values); | ||
3968 | |||
3969 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | ||
3970 | { | ||
3971 | foreach (SceneObjectPart child in partList) | ||
3972 | { | ||
3973 | child.OwnerMask &= child.NextOwnerMask; | ||
3974 | child.GroupMask &= child.NextOwnerMask; | ||
3975 | child.EveryoneMask &= child.NextOwnerMask; | ||
3976 | child.BaseMask &= child.NextOwnerMask; | ||
3977 | } | ||
3978 | } | ||
3979 | |||
3980 | part.ObjectSaleType = 0; | ||
3981 | part.SalePrice = 10; | ||
3982 | |||
3983 | part.ParentGroup.HasGroupChanged = true; | ||
3984 | part.GetProperties(remoteClient); | ||
3985 | part.ScheduleFullUpdate(); | ||
3986 | |||
3987 | break; | ||
3988 | } | ||
3951 | } | 3989 | } |
3952 | } | 3990 | } |
3953 | } | 3991 | } |