diff options
author | Melanie Thielker | 2008-08-24 06:39:54 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-24 06:39:54 +0000 |
commit | 07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a (patch) | |
tree | 36b1f950b1347ef559ce2266c0856d54eb280768 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Plumb the data path for all those eye candy values. Saves texture (diff) | |
download | opensim-SC-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.zip opensim-SC-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.gz opensim-SC-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.bz2 opensim-SC-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.xz |
Selling an object in-place (as original) now works. Builders can
now ply their trade. Is that nuts?
Diffstat (limited to '')
-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 | } |