diff options
author | Justin Clark-Casey (justincc) | 2012-07-17 23:31:38 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-17 23:31:38 +0100 |
commit | ecb759c1e5b0ea3e1c81310acf3fe31561d2be3a (patch) | |
tree | a244524b6c69c3524f3470b668092cc758d214a1 /OpenSim/Region/ScriptEngine/Shared | |
parent | Revert "refactor: make llGiveInventory() use existing GetInventoryItem() meth... (diff) | |
download | opensim-SC-ecb759c1e5b0ea3e1c81310acf3fe31561d2be3a.zip opensim-SC-ecb759c1e5b0ea3e1c81310acf3fe31561d2be3a.tar.gz opensim-SC-ecb759c1e5b0ea3e1c81310acf3fe31561d2be3a.tar.bz2 opensim-SC-ecb759c1e5b0ea3e1c81310acf3fe31561d2be3a.tar.xz |
Fix regression where llGiveInventory() had stopped asking non-owner receivers to accept/decline.
This appears to be a regression from back in commit db91044 (Mon Aug 22 2011) where we started to send TaskInventoryOffered msg dialog rather than InventoryOffered dialog.
This is probably correct, but failed because the bucket was too large and because we wouldn't have handled the TaskInventoryDeclined option anyway.
This patch handles both of these and make llGiveInventoryList() use TaskInventoryOffered as well
Fixes http://opensimulator.org/mantis/view.php?id=6089
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c1ac0e5..b43e8e7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3988,22 +3988,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3988 | if (agentItem == null) | 3988 | if (agentItem == null) |
3989 | return; | 3989 | return; |
3990 | 3990 | ||
3991 | byte[] bucket = new byte[17]; | ||
3992 | bucket[0] = (byte)assetType; | ||
3993 | byte[] objBytes = agentItem.ID.GetBytes(); | ||
3994 | Array.Copy(objBytes, 0, bucket, 1, 16); | ||
3995 | |||
3996 | GridInstantMessage msg = new GridInstantMessage(World, | ||
3997 | m_host.UUID, m_host.Name+", an object owned by "+ | ||
3998 | resolveName(m_host.OwnerID)+",", destId, | ||
3999 | (byte)InstantMessageDialog.TaskInventoryOffered, | ||
4000 | false, objName+"\n"+m_host.Name+" is located at "+ | ||
4001 | World.RegionInfo.RegionName+" "+ | ||
4002 | m_host.AbsolutePosition.ToString(), | ||
4003 | agentItem.ID, true, m_host.AbsolutePosition, | ||
4004 | bucket); | ||
4005 | if (m_TransferModule != null) | 3991 | if (m_TransferModule != null) |
3992 | { | ||
3993 | byte[] bucket = new byte[] { (byte)assetType }; | ||
3994 | |||
3995 | GridInstantMessage msg = new GridInstantMessage(World, | ||
3996 | m_host.UUID, m_host.Name + ", an object owned by " + | ||
3997 | resolveName(m_host.OwnerID) + ",", destId, | ||
3998 | (byte)InstantMessageDialog.TaskInventoryOffered, | ||
3999 | false, objName + "\n" + m_host.Name + " is located at " + | ||
4000 | World.RegionInfo.RegionName + " " + | ||
4001 | m_host.AbsolutePosition.ToString(), | ||
4002 | agentItem.ID, true, m_host.AbsolutePosition, | ||
4003 | bucket); | ||
4004 | |||
4006 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 4005 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4006 | } | ||
4007 | |||
4007 | ScriptSleep(3000); | 4008 | ScriptSleep(3000); |
4008 | } | 4009 | } |
4009 | } | 4010 | } |
@@ -6410,23 +6411,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6410 | if (folderID == UUID.Zero) | 6411 | if (folderID == UUID.Zero) |
6411 | return; | 6412 | return; |
6412 | 6413 | ||
6413 | byte[] bucket = new byte[17]; | ||
6414 | bucket[0] = (byte)AssetType.Folder; | ||
6415 | byte[] objBytes = folderID.GetBytes(); | ||
6416 | Array.Copy(objBytes, 0, bucket, 1, 16); | ||
6417 | |||
6418 | GridInstantMessage msg = new GridInstantMessage(World, | ||
6419 | m_host.UUID, m_host.Name + ", an object owned by " + | ||
6420 | resolveName(m_host.OwnerID) + ",", destID, | ||
6421 | (byte)InstantMessageDialog.InventoryOffered, | ||
6422 | false, category + "\n" + m_host.Name + " is located at " + | ||
6423 | World.RegionInfo.RegionName + " " + | ||
6424 | m_host.AbsolutePosition.ToString(), | ||
6425 | folderID, true, m_host.AbsolutePosition, | ||
6426 | bucket); | ||
6427 | |||
6428 | if (m_TransferModule != null) | 6414 | if (m_TransferModule != null) |
6415 | { | ||
6416 | byte[] bucket = new byte[] { (byte)AssetType.Folder }; | ||
6417 | |||
6418 | GridInstantMessage msg = new GridInstantMessage(World, | ||
6419 | m_host.UUID, m_host.Name + ", an object owned by " + | ||
6420 | resolveName(m_host.OwnerID) + ",", destID, | ||
6421 | (byte)InstantMessageDialog.TaskInventoryOffered, | ||
6422 | false, category + "\n" + m_host.Name + " is located at " + | ||
6423 | World.RegionInfo.RegionName + " " + | ||
6424 | m_host.AbsolutePosition.ToString(), | ||
6425 | folderID, true, m_host.AbsolutePosition, | ||
6426 | bucket); | ||
6427 | |||
6429 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 6428 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
6429 | } | ||
6430 | } | 6430 | } |
6431 | 6431 | ||
6432 | public void llSetVehicleType(int type) | 6432 | public void llSetVehicleType(int type) |