diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs')
-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), |