aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie2011-12-07 00:43:59 +0100
committerMelanie2011-12-07 00:43:59 +0100
commitd6486fe14a77b74235eaa9e1feab36f923dc6ee9 (patch)
tree7bcda14d72eeb74635cbb36cef13539137d945ba /OpenSim/Region/ScriptEngine/Shared/Api
parentRemove harmless merge artefact (diff)
downloadopensim-SC_OLD-d6486fe14a77b74235eaa9e1feab36f923dc6ee9.zip
opensim-SC_OLD-d6486fe14a77b74235eaa9e1feab36f923dc6ee9.tar.gz
opensim-SC_OLD-d6486fe14a77b74235eaa9e1feab36f923dc6ee9.tar.bz2
opensim-SC_OLD-d6486fe14a77b74235eaa9e1feab36f923dc6ee9.tar.xz
Fix task inventory giving
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs38
1 files changed, 23 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d2eb461..7a56f11 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4368,22 +4368,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4368 if (agentItem == null) 4368 if (agentItem == null)
4369 return; 4369 return;
4370 4370
4371 byte[] bucket = new byte[17]; 4371 byte[] bucket = new byte[1];
4372 bucket[0] = (byte)assetType; 4372 bucket[0] = (byte)assetType;
4373 byte[] objBytes = agentItem.ID.GetBytes(); 4373 //byte[] objBytes = agentItem.ID.GetBytes();
4374 Array.Copy(objBytes, 0, bucket, 1, 16); 4374 //Array.Copy(objBytes, 0, bucket, 1, 16);
4375 4375
4376 GridInstantMessage msg = new GridInstantMessage(World, 4376 GridInstantMessage msg = new GridInstantMessage(World,
4377 m_host.UUID, m_host.Name+", an object owned by "+ 4377 m_host.OwnerID, m_host.Name, destId,
4378 resolveName(m_host.OwnerID)+",", destId,
4379 (byte)InstantMessageDialog.TaskInventoryOffered, 4378 (byte)InstantMessageDialog.TaskInventoryOffered,
4380 false, objName+"\n"+m_host.Name+" is located at "+ 4379 false, objName+". "+m_host.Name+" is located at "+
4381 World.RegionInfo.RegionName+" "+ 4380 World.RegionInfo.RegionName+" "+
4382 m_host.AbsolutePosition.ToString(), 4381 m_host.AbsolutePosition.ToString(),
4383 agentItem.ID, true, m_host.AbsolutePosition, 4382 agentItem.ID, true, m_host.AbsolutePosition,
4384 bucket); 4383 bucket);
4385 if (m_TransferModule != null) 4384
4386 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 4385 ScenePresence sp;
4386
4387 if (World.TryGetScenePresence(destId, out sp))
4388 {
4389 sp.ControllingClient.SendInstantMessage(msg);
4390 }
4391 else
4392 {
4393 if (m_TransferModule != null)
4394 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
4395 }
4387 4396
4388 //This delay should only occur when giving inventory to avatars. 4397 //This delay should only occur when giving inventory to avatars.
4389 ScriptSleep(3000); 4398 ScriptSleep(3000);
@@ -6708,16 +6717,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6708 if (folderID == UUID.Zero) 6717 if (folderID == UUID.Zero)
6709 return; 6718 return;
6710 6719
6711 byte[] bucket = new byte[17]; 6720 byte[] bucket = new byte[1];
6712 bucket[0] = (byte)AssetType.Folder; 6721 bucket[0] = (byte)AssetType.Folder;
6713 byte[] objBytes = folderID.GetBytes(); 6722 //byte[] objBytes = folderID.GetBytes();
6714 Array.Copy(objBytes, 0, bucket, 1, 16); 6723 //Array.Copy(objBytes, 0, bucket, 1, 16);
6715 6724
6716 GridInstantMessage msg = new GridInstantMessage(World, 6725 GridInstantMessage msg = new GridInstantMessage(World,
6717 m_host.UUID, m_host.Name+", an object owned by "+ 6726 m_host.OwnerID, m_host.Name, destID,
6718 resolveName(m_host.OwnerID)+",", destID, 6727 (byte)InstantMessageDialog.TaskInventoryOffered,
6719 (byte)InstantMessageDialog.InventoryOffered, 6728 false, category+". "+m_host.Name+" is located at "+
6720 false, category+"\n"+m_host.Name+" is located at "+
6721 World.RegionInfo.RegionName+" "+ 6729 World.RegionInfo.RegionName+" "+
6722 m_host.AbsolutePosition.ToString(), 6730 m_host.AbsolutePosition.ToString(),
6723 folderID, true, m_host.AbsolutePosition, 6731 folderID, true, m_host.AbsolutePosition,