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 | |
parent | Plumb the data path for all those eye candy values. Saves texture (diff) | |
download | opensim-SC_OLD-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.zip opensim-SC_OLD-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.gz opensim-SC_OLD-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.bz2 opensim-SC_OLD-07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a.tar.xz |
Selling an object in-place (as original) now works. Builders can
now ply their trade. Is that nuts?
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 38 |
3 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index b98f2d6..3fa1825d 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1312,6 +1312,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1312 | { | 1312 | { |
1313 | if (((SceneObjectGroup)ent).LocalId == childPrims[i]) | 1313 | if (((SceneObjectGroup)ent).LocalId == childPrims[i]) |
1314 | { | 1314 | { |
1315 | // Make sure no child prim is set for sale | ||
1316 | // So that, on delink, no prims are unwittingly | ||
1317 | // left for sale and sold off | ||
1318 | ((SceneObjectGroup)ent).RootPart.ObjectSaleType = 0; | ||
1319 | ((SceneObjectGroup)ent).RootPart.SalePrice = 10; | ||
1315 | children.Add((SceneObjectGroup)ent); | 1320 | children.Add((SceneObjectGroup)ent); |
1316 | } | 1321 | } |
1317 | } | 1322 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 8382467..ffb8501 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1985,6 +1985,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1985 | 1985 | ||
1986 | if (rootPart.OwnerID != item.Owner) | 1986 | if (rootPart.OwnerID != item.Owner) |
1987 | { | 1987 | { |
1988 | //Need to kill the for sale here | ||
1989 | rootPart.ObjectSaleType = 0; | ||
1990 | rootPart.SalePrice = 10; | ||
1991 | |||
1988 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | 1992 | if (ExternalChecks.ExternalChecksPropagatePermissions()) |
1989 | { | 1993 | { |
1990 | if ((item.CurrentPermissions & 8) != 0) | 1994 | if ((item.CurrentPermissions & 8) != 0) |
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 | } |