diff options
author | Melanie | 2011-12-07 00:43:59 +0100 |
---|---|---|
committer | Melanie | 2011-12-07 00:43:59 +0100 |
commit | d6486fe14a77b74235eaa9e1feab36f923dc6ee9 (patch) | |
tree | 7bcda14d72eeb74635cbb36cef13539137d945ba /OpenSim/Region/CoreModules | |
parent | Remove harmless merge artefact (diff) | |
download | opensim-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/CoreModules')
3 files changed, 16 insertions, 41 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 712632b..6064ddc 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -146,20 +146,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
146 | ScenePresence sp = scene.GetScenePresence(toAgentID); | 146 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
147 | if (sp != null && !sp.IsChildAgent) | 147 | if (sp != null && !sp.IsChildAgent) |
148 | { | 148 | { |
149 | // m_log.DebugFormat( | 149 | // Local message |
150 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", | 150 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); |
151 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | 151 | sp.ControllingClient.SendInstantMessage(im); |
152 | |||
153 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | ||
154 | if (!user.IsChildAgent) | ||
155 | { | ||
156 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering to client"); | ||
157 | user.ControllingClient.SendInstantMessage(im); | ||
158 | 152 | ||
159 | // Message sent | 153 | // Message sent |
160 | result(true); | 154 | result(true); |
161 | return; | 155 | return; |
162 | } | ||
163 | } | 156 | } |
164 | } | 157 | } |
165 | 158 | ||
@@ -172,10 +165,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
172 | if (sp != null) | 165 | if (sp != null) |
173 | { | 166 | { |
174 | // Local message | 167 | // Local message |
175 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 168 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID); |
176 | 169 | sp.ControllingClient.SendInstantMessage(im); | |
177 | // m_log.DebugFormat("[INSTANT MESSAGE]: Delivering to client"); | ||
178 | user.ControllingClient.SendInstantMessage(im); | ||
179 | 170 | ||
180 | // Message sent | 171 | // Message sent |
181 | result(true); | 172 | result(true); |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 5ab604f..b27b07d 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -212,7 +212,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
212 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && | 212 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && |
213 | im.dialog != (byte)InstantMessageDialog.GroupNotice && | 213 | im.dialog != (byte)InstantMessageDialog.GroupNotice && |
214 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && | 214 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && |
215 | im.dialog != (byte)InstantMessageDialog.InventoryOffered) | 215 | im.dialog != (byte)InstantMessageDialog.InventoryOffered && |
216 | im.dialog != (byte)InstantMessageDialog.TaskInventoryOffered) | ||
216 | { | 217 | { |
217 | return; | 218 | return; |
218 | } | 219 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index aa211ba..677fab9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -265,7 +265,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
265 | }); | 265 | }); |
266 | } | 266 | } |
267 | } | 267 | } |
268 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted) | 268 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || |
269 | im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
269 | { | 270 | { |
270 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); | 271 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); |
271 | 272 | ||
@@ -276,30 +277,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
276 | else | 277 | else |
277 | { | 278 | { |
278 | if (m_TransferModule != null) | 279 | if (m_TransferModule != null) |
279 | m_TransferModule.SendInstantMessage(im, delegate(bool success) { | 280 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); |
280 | |||
281 | // justincc - FIXME: Comment out for now. This code was added in commit db91044 Mon Aug 22 2011 | ||
282 | // and is apparently supposed to fix bulk inventory updates after accepting items. But | ||
283 | // instead it appears to cause two copies of an accepted folder for the receiving user in | ||
284 | // at least some cases. Folder/item update is already done when the offer is made (see code above) | ||
285 | |||
286 | // // Send BulkUpdateInventory | ||
287 | // IInventoryService invService = scene.InventoryService; | ||
288 | // UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item /folder, back from it's trip | ||
289 | // | ||
290 | // InventoryFolderBase folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); | ||
291 | // folder = invService.GetFolder(folder); | ||
292 | // | ||
293 | // ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID)); | ||
294 | // | ||
295 | // // If the user has left the scene by the time the message comes back then we can't send | ||
296 | // // them the update. | ||
297 | // if (fromUser != null) | ||
298 | // fromUser.ControllingClient.SendBulkUpdateInventory(folder); | ||
299 | }); | ||
300 | } | 281 | } |
301 | } | 282 | } |
302 | else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined) | 283 | else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined || |
284 | im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined) | ||
303 | { | 285 | { |
304 | // Here, the recipient is local and we can assume that the | 286 | // Here, the recipient is local and we can assume that the |
305 | // inventory is loaded. Courtesy of the above bulk update, | 287 | // inventory is loaded. Courtesy of the above bulk update, |
@@ -335,6 +317,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
335 | { | 317 | { |
336 | folder.ParentID = trashFolder.ID; | 318 | folder.ParentID = trashFolder.ID; |
337 | invService.MoveFolder(folder); | 319 | invService.MoveFolder(folder); |
320 | client.SendBulkUpdateInventory(folder); | ||
338 | } | 321 | } |
339 | } | 322 | } |
340 | 323 | ||