aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-24 06:39:54 +0000
committerMelanie Thielker2008-08-24 06:39:54 +0000
commit07cb1d4f0e9acfaba22b9b8ef1611613ab827a1a (patch)
tree36b1f950b1347ef559ce2266c0856d54eb280768
parentPlumb the data path for all those eye candy values. Saves texture (diff)
downloadopensim-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?
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs38
4 files changed, 61 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index c0ebbc6..f6b49af 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -1554,6 +1554,11 @@ namespace OpenSim.Data.MySQL
1554 row["LoopedSound"] = prim.Sound.ToString(); 1554 row["LoopedSound"] = prim.Sound.ToString();
1555 row["LoopedSoundGain"] = prim.SoundGain; 1555 row["LoopedSoundGain"] = prim.SoundGain;
1556 } 1556 }
1557 else
1558 {
1559 row["LoopedSound"] = LLUUID.Zero;
1560 row["LoopedSoundGain"] = 0.0f;
1561 }
1557 1562
1558 row["TextureAnimation"] = prim.TextureAnimation; 1563 row["TextureAnimation"] = prim.TextureAnimation;
1559 1564
@@ -1562,22 +1567,29 @@ namespace OpenSim.Data.MySQL
1562 row["OmegaZ"] = prim.RotationalVelocity.Z; 1567 row["OmegaZ"] = prim.RotationalVelocity.Z;
1563 1568
1564 row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X; 1569 row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().X;
1565 row["CameraEyeOffsetX"] = prim.GetCameraEyeOffset().Y; 1570 row["CameraEyeOffsetY"] = prim.GetCameraEyeOffset().Y;
1566 row["CameraEyeOffsetZ"] = prim.GetCameraEyeOffset().Z; 1571 row["CameraEyeOffsetZ"] = prim.GetCameraEyeOffset().Z;
1567 1572
1568 row["CameraAtOffsetX"] = prim.GetCameraAtOffset().X; 1573 row["CameraAtOffsetX"] = prim.GetCameraAtOffset().X;
1569 row["CameraAtOffsetX"] = prim.GetCameraAtOffset().Y; 1574 row["CameraAtOffsetY"] = prim.GetCameraAtOffset().Y;
1570 row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z; 1575 row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
1571 1576
1572 if (prim.GetForceMouselook()) 1577 if (prim.GetForceMouselook())
1573 row["ForceMouselook"] = 1; 1578 row["ForceMouselook"] = 1;
1579 else
1580 row["ForceMouselook"] = 0;
1574 1581
1575 row["ScriptAccessPin"] = prim.ScriptAccessPin; 1582 row["ScriptAccessPin"] = prim.ScriptAccessPin;
1576 1583
1577 if (prim.AllowedDrop) 1584 if (prim.AllowedDrop)
1578 row["AllowedDrop"] = 1; 1585 row["AllowedDrop"] = 1;
1586 else
1587 row["AllowedDrop"] = 0;
1588
1579 if (prim.DIE_AT_EDGE) 1589 if (prim.DIE_AT_EDGE)
1580 row["DieAtEdge"] = 1; 1590 row["DieAtEdge"] = 1;
1591 else
1592 row["DieAtEdge"] = 0;
1581 1593
1582 row["SalePrice"] = prim.SalePrice; 1594 row["SalePrice"] = prim.SalePrice;
1583 row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType); 1595 row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType);
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}