aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs21
1 files changed, 6 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 1e4f0a4..2abc910 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -38,6 +38,7 @@ using OpenSim.Region.Framework;
38using OpenSim.Region.Framework.Interfaces; 38using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes; 39using OpenSim.Region.Framework.Scenes;
40using OpenSim.Region.Framework.Scenes.Serialization; 40using OpenSim.Region.Framework.Scenes.Serialization;
41using PermissionMask = OpenSim.Framework.PermissionMask;
41 42
42namespace OpenSim.Region.CoreModules.World.Objects.BuySell 43namespace OpenSim.Region.CoreModules.World.Objects.BuySell
43{ 44{
@@ -140,6 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
140 141
141 part.ObjectSaleType = 0; 142 part.ObjectSaleType = 0;
142 part.SalePrice = 10; 143 part.SalePrice = 10;
144 part.ClickAction = Convert.ToByte(0);
143 145
144 group.HasGroupChanged = true; 146 group.HasGroupChanged = true;
145 part.SendPropertiesToClient(remoteClient); 147 part.SendPropertiesToClient(remoteClient);
@@ -150,14 +152,9 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
150 break; 152 break;
151 153
152 case 2: // Sell a copy 154 case 2: // Sell a copy
153 Vector3 inventoryStoredPosition = new Vector3 155 Vector3 inventoryStoredPosition = new Vector3(
154 (((group.AbsolutePosition.X > (int)Constants.RegionSize) 156 Math.Min(group.AbsolutePosition.X, m_scene.RegionInfo.RegionSizeX - 6),
155 ? 250 157 Math.Min(group.AbsolutePosition.Y, m_scene.RegionInfo.RegionSizeY - 6),
156 : group.AbsolutePosition.X)
157 ,
158 (group.AbsolutePosition.X > (int)Constants.RegionSize)
159 ? 250
160 : group.AbsolutePosition.X,
161 group.AbsolutePosition.Z); 158 group.AbsolutePosition.Z);
162 159
163 Vector3 originalPosition = group.AbsolutePosition; 160 Vector3 originalPosition = group.AbsolutePosition;
@@ -197,13 +194,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
197 item.InvType = (int)InventoryType.Object; 194 item.InvType = (int)InventoryType.Object;
198 item.Folder = categoryID; 195 item.Folder = categoryID;
199 196
200 uint nextPerms=(perms & 7) << 13; 197 PermissionsUtil.ApplyFoldedPermissions(perms, ref perms);
201 if ((nextPerms & (uint)PermissionMask.Copy) == 0)
202 perms &= ~(uint)PermissionMask.Copy;
203 if ((nextPerms & (uint)PermissionMask.Transfer) == 0)
204 perms &= ~(uint)PermissionMask.Transfer;
205 if ((nextPerms & (uint)PermissionMask.Modify) == 0)
206 perms &= ~(uint)PermissionMask.Modify;
207 198
208 item.BasePermissions = perms & part.NextOwnerMask; 199 item.BasePermissions = perms & part.NextOwnerMask;
209 item.CurrentPermissions = perms & part.NextOwnerMask; 200 item.CurrentPermissions = perms & part.NextOwnerMask;