Selling an object in-place (as original) now works. Builders can
now ply their trade. Is that nuts?0.6.0-stable
parent
c9b5641c49
commit
07cb1d4f0e
|
@ -1554,6 +1554,11 @@ namespace OpenSim.Data.MySQL
|
||||||
row["LoopedSound"] = prim.Sound.ToString();
|
row["LoopedSound"] = prim.Sound.ToString();
|
||||||
row["LoopedSoundGain"] = prim.SoundGain;
|
row["LoopedSoundGain"] = prim.SoundGain;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row["LoopedSound"] = LLUUID.Zero;
|
||||||
|
row["LoopedSoundGain"] = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
row["TextureAnimation"] = prim.TextureAnimation;
|
row["TextureAnimation"] = prim.TextureAnimation;
|
||||||
|
|
||||||
|
@ -1562,22 +1567,29 @@ namespace OpenSim.Data.MySQL
|
||||||
row["OmegaZ"] = prim.RotationalVelocity.Z;
|
row["OmegaZ"] = prim.RotationalVelocity.Z;
|
||||||
|
|
||||||
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
|
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
|
||||||
row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().Y;
|
row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;
|
||||||
row["CameraEyeOffsetZ"] = prim.GetCameraEyeOffset().Z;
|
row["CameraEyeOffsetZ"] = prim.GetCameraEyeOffset().Z;
|
||||||
|
|
||||||
row["CameraAtOffsetX"] = prim.GetCameraAtOffset().X;
|
row["CameraAtOffsetX"] = prim.GetCameraAtOffset().X;
|
||||||
row["CameraAtOffsetX"] = prim.GetCameraAtOffset().Y;
|
row["CameraAtOffsetY"] = prim.GetCameraAtOffset().Y;
|
||||||
row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
|
row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
|
||||||
|
|
||||||
if (prim.GetForceMouselook())
|
if (prim.GetForceMouselook())
|
||||||
row["ForceMouselook"] = 1;
|
row["ForceMouselook"] = 1;
|
||||||
|
else
|
||||||
|
row["ForceMouselook"] = 0;
|
||||||
|
|
||||||
row["ScriptAccessPin"] = prim.ScriptAccessPin;
|
row["ScriptAccessPin"] = prim.ScriptAccessPin;
|
||||||
|
|
||||||
if (prim.AllowedDrop)
|
if (prim.AllowedDrop)
|
||||||
row["AllowedDrop"] = 1;
|
row["AllowedDrop"] = 1;
|
||||||
|
else
|
||||||
|
row["AllowedDrop"] = 0;
|
||||||
|
|
||||||
if (prim.DIE_AT_EDGE)
|
if (prim.DIE_AT_EDGE)
|
||||||
row["DieAtEdge"] = 1;
|
row["DieAtEdge"] = 1;
|
||||||
|
else
|
||||||
|
row["DieAtEdge"] = 0;
|
||||||
|
|
||||||
row["SalePrice"] = prim.SalePrice;
|
row["SalePrice"] = prim.SalePrice;
|
||||||
row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType);
|
row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType);
|
||||||
|
|
|
@ -1312,6 +1312,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (((SceneObjectGroup)ent).LocalId == childPrims[i])
|
if (((SceneObjectGroup)ent).LocalId == childPrims[i])
|
||||||
{
|
{
|
||||||
|
// Make sure no child prim is set for sale
|
||||||
|
// So that, on delink, no prims are unwittingly
|
||||||
|
// left for sale and sold off
|
||||||
|
((SceneObjectGroup)ent).RootPart.ObjectSaleType = 0;
|
||||||
|
((SceneObjectGroup)ent).RootPart.SalePrice = 10;
|
||||||
children.Add((SceneObjectGroup)ent);
|
children.Add((SceneObjectGroup)ent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1985,6 +1985,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (rootPart.OwnerID != item.Owner)
|
if (rootPart.OwnerID != item.Owner)
|
||||||
{
|
{
|
||||||
|
//Need to kill the for sale here
|
||||||
|
rootPart.ObjectSaleType = 0;
|
||||||
|
rootPart.SalePrice = 10;
|
||||||
|
|
||||||
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||||
{
|
{
|
||||||
if ((item.CurrentPermissions & 8) != 0)
|
if ((item.CurrentPermissions & 8) != 0)
|
||||||
|
|
|
@ -3948,6 +3948,44 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID,
|
public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID,
|
||||||
uint localID, byte saleType)
|
uint localID, byte saleType)
|
||||||
{
|
{
|
||||||
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
|
||||||
|
if(part == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (saleType)
|
||||||
|
{
|
||||||
|
case 1: // Sell as original (in-place sale)
|
||||||
|
if(part.ParentGroup == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
part.ParentGroup.SetOwnerId(remoteClient.AgentId);
|
||||||
|
part.ParentGroup.SetRootPartOwner(part, remoteClient.AgentId,
|
||||||
|
remoteClient.ActiveGroupId);
|
||||||
|
|
||||||
|
List<SceneObjectPart> partList =
|
||||||
|
new List<SceneObjectPart>(part.ParentGroup.Children.Values);
|
||||||
|
|
||||||
|
if (ExternalChecks.ExternalChecksPropagatePermissions())
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart child in partList)
|
||||||
|
{
|
||||||
|
child.OwnerMask &= child.NextOwnerMask;
|
||||||
|
child.GroupMask &= child.NextOwnerMask;
|
||||||
|
child.EveryoneMask &= child.NextOwnerMask;
|
||||||
|
child.BaseMask &= child.NextOwnerMask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
part.ObjectSaleType = 0;
|
||||||
|
part.SalePrice = 10;
|
||||||
|
|
||||||
|
part.ParentGroup.HasGroupChanged = true;
|
||||||
|
part.GetProperties(remoteClient);
|
||||||
|
part.ScheduleFullUpdate();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue