aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-01-29 22:50:59 +0000
committerMelanie2012-01-29 22:50:59 +0000
commit9a86a713d3fa71d00328ee6d005bb0c37a76f214 (patch)
tree0aa5d98a226548d45bd7fed54bc80a104ca6bc2e /OpenSim
parentMake all NPCs owned by default (diff)
parentFix llEdgeOfWorld functionality - see mantis http://opensimulator.org/mantis/... (diff)
downloadopensim-SC-9a86a713d3fa71d00328ee6d005bb0c37a76f214.zip
opensim-SC-9a86a713d3fa71d00328ee6d005bb0c37a76f214.tar.gz
opensim-SC-9a86a713d3fa71d00328ee6d005bb0c37a76f214.tar.bz2
opensim-SC-9a86a713d3fa71d00328ee6d005bb0c37a76f214.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim')
-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
4 files changed, 75 insertions, 5 deletions
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