aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs6
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations6
-rw-r--r--OpenSim/Framework/RegionSettings.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs71
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
7 files changed, 93 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index e07d94b..d459e08 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -1012,7 +1012,7 @@ namespace OpenSim.Data.MySQL
1012 "covenant, Sandbox, sunvectorx, sunvectory, " + 1012 "covenant, Sandbox, sunvectorx, sunvectory, " +
1013 "sunvectorz, loaded_creation_datetime, " + 1013 "sunvectorz, loaded_creation_datetime, " +
1014 "loaded_creation_id, map_tile_ID, block_search, casino, " + 1014 "loaded_creation_id, map_tile_ID, block_search, casino, " +
1015 "TelehubObject) " + 1015 "TelehubObject, parcel_tile_ID) " +
1016 "values (?RegionUUID, ?BlockTerraform, " + 1016 "values (?RegionUUID, ?BlockTerraform, " +
1017 "?BlockFly, ?AllowDamage, ?RestrictPushing, " + 1017 "?BlockFly, ?AllowDamage, ?RestrictPushing, " +
1018 "?AllowLandResell, ?AllowLandJoinDivide, " + 1018 "?AllowLandResell, ?AllowLandJoinDivide, " +
@@ -1029,7 +1029,7 @@ namespace OpenSim.Data.MySQL
1029 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + 1029 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
1030 "?LoadedCreationDateTime, ?LoadedCreationID, " + 1030 "?LoadedCreationDateTime, ?LoadedCreationID, " +
1031 "?TerrainImageID, ?block_search, ?casino, " + 1031 "?TerrainImageID, ?block_search, ?casino, " +
1032 "?TelehubObject)"; 1032 "?TelehubObject, ?ParcelImageID)";
1033 1033
1034 FillRegionSettingsCommand(cmd, rs); 1034 FillRegionSettingsCommand(cmd, rs);
1035 1035
@@ -1317,6 +1317,7 @@ namespace OpenSim.Data.MySQL
1317 newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; 1317 newSettings.LoadedCreationID = (String) row["loaded_creation_id"];
1318 1318
1319 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); 1319 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
1320 newSettings.ParcelImageID = DBGuid.FromDB(row["parcel_tile_ID"]);
1320 newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]); 1321 newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]);
1321 1322
1322 newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]); 1323 newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
@@ -1658,6 +1659,7 @@ namespace OpenSim.Data.MySQL
1658 cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch); 1659 cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch);
1659 cmd.Parameters.AddWithValue("casino", settings.Casino); 1660 cmd.Parameters.AddWithValue("casino", settings.Casino);
1660 1661
1662 cmd.Parameters.AddWithValue("ParcelImageID", settings.ParcelImageID);
1661 cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject); 1663 cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject);
1662 } 1664 }
1663 1665
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 219de62..dae704c 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -857,3 +857,9 @@ CREATE TABLE IF NOT EXISTS `spawn_points` (
857ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL; 857ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL;
858COMMIT; 858COMMIT;
859 859
860:VERSION 40 #---------------- Parcels for sale
861
862BEGIN;
863ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
864COMMIT;
865
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index 786638e..e668ad5 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -373,6 +373,14 @@ namespace OpenSim.Framework
373 set { m_SunVector = value; } 373 set { m_SunVector = value; }
374 } 374 }
375 375
376 private UUID m_ParcelImageID;
377
378 public UUID ParcelImageID
379 {
380 get { return m_ParcelImageID; }
381 set { m_ParcelImageID = value; }
382 }
383
376 private UUID m_TerrainImageID; 384 private UUID m_TerrainImageID;
377 385
378 public UUID TerrainImageID 386 public UUID TerrainImageID
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 7bc59fc..cf0c28b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -94,6 +94,7 @@ namespace OpenSim.Region.ClientStack.Linden
94 private static readonly string m_notecardUpdatePath = "0004/"; 94 private static readonly string m_notecardUpdatePath = "0004/";
95 private static readonly string m_notecardTaskUpdatePath = "0005/"; 95 private static readonly string m_notecardTaskUpdatePath = "0005/";
96 // private static readonly string m_fetchInventoryPath = "0006/"; 96 // private static readonly string m_fetchInventoryPath = "0006/";
97 private static readonly string m_copyFromNotecardPath = "0007/";
97 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. 98 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
98 99
99 100
@@ -180,6 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
180 m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); 181 m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req);
181 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); 182 m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req);
182 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); 183 m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req);
184 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", new RestStreamHandler("POST", capsBase + m_copyFromNotecardPath, CopyInventoryFromNotecard));
183 185
184 // As of RC 1.22.9 of the Linden client this is 186 // As of RC 1.22.9 of the Linden client this is
185 // supported 187 // supported
@@ -723,6 +725,75 @@ namespace OpenSim.Region.ClientStack.Linden
723 725
724 return LLSDHelpers.SerialiseLLSDReply(uploadResponse); 726 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
725 } 727 }
728
729 /// <summary>
730 /// Called by the CopyInventoryFromNotecard caps handler.
731 /// </summary>
732 /// <param name="request"></param>
733 /// <param name="path"></param>
734 /// <param name="param"></param>
735 public string CopyInventoryFromNotecard(string request, string path, string param,
736 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
737 {
738 Hashtable response = new Hashtable();
739 response["int_response_code"] = 404;
740 response["content_type"] = "text/plain";
741 response["keepalive"] = false;
742 response["str_response_string"] = "";
743
744 try
745 {
746 OSDMap content = (OSDMap)OSDParser.DeserializeLLSDXml(request);
747 UUID objectID = content["object-id"].AsUUID();
748 UUID notecardID = content["notecard-id"].AsUUID();
749 UUID folderID = content["folder-id"].AsUUID();
750 UUID itemID = content["item-id"].AsUUID();
751
752 // m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, FolderID:{0}, ItemID:{1}, NotecardID:{2}, ObjectID:{3}", folderID, itemID, notecardID, objectID);
753
754 if (objectID != UUID.Zero)
755 {
756 SceneObjectPart part = m_Scene.GetSceneObjectPart(objectID);
757 if (part != null)
758 {
759 TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(notecardID);
760 if (!m_Scene.Permissions.CanCopyObjectInventory(notecardID, objectID, m_HostCapsObj.AgentID))
761 {
762 return LLSDHelpers.SerialiseLLSDReply(response);
763 }
764 }
765 }
766
767 InventoryItemBase item = null;
768 InventoryItemBase copyItem = null;
769 IClientAPI client = null;
770
771 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
772 item = m_Scene.InventoryService.GetItem(new InventoryItemBase(itemID));
773 if (item != null)
774 {
775 copyItem = m_Scene.GiveInventoryItem(m_HostCapsObj.AgentID, item.Owner, itemID, folderID);
776 if (copyItem != null && client != null)
777 {
778 m_log.InfoFormat("[CAPS]: CopyInventoryFromNotecard, ItemID:{0}, FolderID:{1}", copyItem.ID, copyItem.Folder);
779 client.SendBulkUpdateInventory(copyItem);
780 }
781 }
782 else
783 {
784 m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard - Failed to retrieve item {0} from notecard {1}", itemID, notecardID);
785 if (client != null)
786 client.SendAlertMessage("Failed to retrieve item");
787 }
788 }
789 catch (Exception e)
790 {
791 m_log.ErrorFormat("[CAPS]: CopyInventoryFromNotecard : {0}", e.ToString());
792 }
793
794 response["int_response_code"] = 200;
795 return LLSDHelpers.SerialiseLLSDReply(response);
796 }
726 } 797 }
727 798
728 public class AssetUploader 799 public class AssetUploader
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 80cb623..f1399af 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -209,8 +209,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
209 209
210 foreach (SceneObjectGroup grp in sp.GetAttachments()) 210 foreach (SceneObjectGroup grp in sp.GetAttachments())
211 { 211 {
212 if (grp.IsDeleted) 212 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
213 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
214 } 213 }
215 } 214 }
216 else // Another region possibly in another simulator 215 else // Another region possibly in another simulator
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 3c1b3e0..9a763ee 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
464 mapitem.x = (uint)(xstart + x); 464 mapitem.x = (uint)(xstart + x);
465 mapitem.y = (uint)(ystart + y); 465 mapitem.y = (uint)(ystart + y);
466 // mapitem.z = (uint)m_scene.GetGroundHeight(x,y); 466 // mapitem.z = (uint)m_scene.GetGroundHeight(x,y);
467 mapitem.id = UUID.Zero; 467 mapitem.id = parcel.GlobalID;
468 mapitem.name = parcel.Name; 468 mapitem.name = parcel.Name;
469 mapitem.Extra = parcel.Area; 469 mapitem.Extra = parcel.Area;
470 mapitem.Extra2 = parcel.SalePrice; 470 mapitem.Extra2 = parcel.SalePrice;
@@ -1291,7 +1291,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1291 responsemapdata["X"] = OSD.FromInteger((int)(xstart + x)); 1291 responsemapdata["X"] = OSD.FromInteger((int)(xstart + x));
1292 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + y)); 1292 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + y));
1293 // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); 1293 // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y));
1294 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 1294 responsemapdata["ID"] = OSD.FromUUID(parcel.GlobalID);
1295 responsemapdata["Name"] = OSD.FromString(parcel.Name); 1295 responsemapdata["Name"] = OSD.FromString(parcel.Name);
1296 responsemapdata["Extra"] = OSD.FromInteger(parcel.Area); 1296 responsemapdata["Extra"] = OSD.FromInteger(parcel.Area);
1297 responsemapdata["Extra2"] = OSD.FromInteger(parcel.SalePrice); 1297 responsemapdata["Extra2"] = OSD.FromInteger(parcel.SalePrice);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 9c4bfb6..01e5dbe 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5882,7 +5882,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5882 5882
5883 foreach (GridRegion sri in neighbors) 5883 foreach (GridRegion sri in neighbors)
5884 { 5884 {
5885 if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) 5885 if (sri.RegionCoordX == neighborX && sri.RegionCoordY == neighborY)
5886 return 0; 5886 return 0;
5887 } 5887 }
5888 5888