diff options
author | UbitUmarov | 2017-05-01 14:42:38 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-01 14:42:38 +0100 |
commit | 28d8eda768a64e1eff9edf3006f494d4f0d62bc3 (patch) | |
tree | 675c64f5a0b055c6c165d9d86d9721e733f7f392 /OpenSim/Region/CoreModules | |
parent | rename sog.GetEffectivePermissions() since its use is now limited to more spe... (diff) | |
download | opensim-SC_OLD-28d8eda768a64e1eff9edf3006f494d4f0d62bc3.zip opensim-SC_OLD-28d8eda768a64e1eff9edf3006f494d4f0d62bc3.tar.gz opensim-SC_OLD-28d8eda768a64e1eff9edf3006f494d4f0d62bc3.tar.bz2 opensim-SC_OLD-28d8eda768a64e1eff9edf3006f494d4f0d62bc3.tar.xz |
buysell: make sure we dont buy child parts, dont mess with absolute position its useless with variable size regions, and its a rezing job
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index d1a109e..a7a9d1d 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -118,6 +118,11 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
118 | return false; | 118 | return false; |
119 | 119 | ||
120 | SceneObjectGroup group = part.ParentGroup; | 120 | SceneObjectGroup group = part.ParentGroup; |
121 | if(group == null || group.IsDeleted || group.inTransit) | ||
122 | return false; | ||
123 | |||
124 | // make sure we are not buying a child part | ||
125 | part = group.RootPart; | ||
121 | 126 | ||
122 | switch (saleType) | 127 | switch (saleType) |
123 | { | 128 | { |
@@ -157,18 +162,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
157 | break; | 162 | break; |
158 | 163 | ||
159 | case 2: // Sell a copy | 164 | case 2: // Sell a copy |
160 | Vector3 inventoryStoredPosition = new Vector3( | ||
161 | Math.Min(group.AbsolutePosition.X, m_scene.RegionInfo.RegionSizeX - 6), | ||
162 | Math.Min(group.AbsolutePosition.Y, m_scene.RegionInfo.RegionSizeY - 6), | ||
163 | group.AbsolutePosition.Z); | ||
164 | |||
165 | Vector3 originalPosition = group.AbsolutePosition; | ||
166 | |||
167 | group.AbsolutePosition = inventoryStoredPosition; | ||
168 | |||
169 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); | ||
170 | group.AbsolutePosition = originalPosition; | ||
171 | |||
172 | uint perms = group.EffectiveOwnerPerms; | 165 | uint perms = group.EffectiveOwnerPerms; |
173 | 166 | ||
174 | if ((perms & (uint)PermissionMask.Transfer) == 0) | 167 | if ((perms & (uint)PermissionMask.Transfer) == 0) |
@@ -185,6 +178,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
185 | return false; | 178 | return false; |
186 | } | 179 | } |
187 | 180 | ||
181 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); | ||
182 | |||
188 | AssetBase asset = m_scene.CreateAsset( | 183 | AssetBase asset = m_scene.CreateAsset( |
189 | group.GetPartName(localID), | 184 | group.GetPartName(localID), |
190 | group.GetPartDescription(localID), | 185 | group.GetPartDescription(localID), |