diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 49 |
2 files changed, 38 insertions, 40 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 270b01b..e1281a6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -435,10 +435,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
435 | } | 435 | } |
436 | else | 436 | else |
437 | { | 437 | { |
438 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 438 | if (AgentTransactionsModule != null) |
439 | if (agentTransactions != null) | ||
440 | { | 439 | { |
441 | agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); | 440 | AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); |
442 | } | 441 | } |
443 | } | 442 | } |
444 | } | 443 | } |
@@ -1566,21 +1565,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1566 | // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the | 1565 | // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the |
1567 | // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update) | 1566 | // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update) |
1568 | // will not pass in a transaction ID in the update message. | 1567 | // will not pass in a transaction ID in the update message. |
1569 | if (transactionID != UUID.Zero) | 1568 | if (transactionID != UUID.Zero && AgentTransactionsModule != null) |
1570 | { | 1569 | { |
1571 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 1570 | AgentTransactionsModule.HandleTaskItemUpdateFromTransaction( |
1572 | if (agentTransactions != null) | 1571 | remoteClient, part, transactionID, currentItem); |
1573 | { | 1572 | |
1574 | agentTransactions.HandleTaskItemUpdateFromTransaction( | 1573 | // if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) |
1575 | remoteClient, part, transactionID, currentItem); | 1574 | // remoteClient.SendAgentAlertMessage("Notecard saved", false); |
1576 | 1575 | // else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) | |
1577 | // if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) | 1576 | // remoteClient.SendAgentAlertMessage("Script saved", false); |
1578 | // remoteClient.SendAgentAlertMessage("Notecard saved", false); | 1577 | // else |
1579 | // else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) | 1578 | // remoteClient.SendAgentAlertMessage("Item saved", false); |
1580 | // remoteClient.SendAgentAlertMessage("Script saved", false); | ||
1581 | // else | ||
1582 | // remoteClient.SendAgentAlertMessage("Item saved", false); | ||
1583 | } | ||
1584 | } | 1579 | } |
1585 | 1580 | ||
1586 | // Base ALWAYS has move | 1581 | // Base ALWAYS has move |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9c80d3e..78fbd3b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -521,6 +521,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
521 | 521 | ||
522 | public IAttachmentsModule AttachmentsModule { get; set; } | 522 | public IAttachmentsModule AttachmentsModule { get; set; } |
523 | public IEntityTransferModule EntityTransferModule { get; private set; } | 523 | public IEntityTransferModule EntityTransferModule { get; private set; } |
524 | public IAgentAssetTransactions AgentTransactionsModule { get; private set; } | ||
524 | 525 | ||
525 | public IAvatarFactoryModule AvatarFactory | 526 | public IAvatarFactoryModule AvatarFactory |
526 | { | 527 | { |
@@ -1289,6 +1290,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1289 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); | 1290 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); |
1290 | EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); | 1291 | EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); |
1291 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); | 1292 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); |
1293 | AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>(); | ||
1292 | } | 1294 | } |
1293 | 1295 | ||
1294 | #endregion | 1296 | #endregion |
@@ -3428,32 +3430,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
3428 | { | 3430 | { |
3429 | m_eventManager.TriggerOnRemovePresence(agentID); | 3431 | m_eventManager.TriggerOnRemovePresence(agentID); |
3430 | 3432 | ||
3431 | if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc) | 3433 | if (!isChildAgent) |
3432 | { | 3434 | { |
3433 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); | 3435 | if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc) |
3434 | // Don't save attachments for HG visitors, it | ||
3435 | // messes up their inventory. When a HG visitor logs | ||
3436 | // out on a foreign grid, their attachments will be | ||
3437 | // reloaded in the state they were in when they left | ||
3438 | // the home grid. This is best anyway as the visited | ||
3439 | // grid may use an incompatible script engine. | ||
3440 | if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) | ||
3441 | AttachmentsModule.SaveChangedAttachments(avatar, false); | ||
3442 | } | ||
3443 | |||
3444 | ForEachClient( | ||
3445 | delegate(IClientAPI client) | ||
3446 | { | 3436 | { |
3447 | //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway | 3437 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); |
3448 | try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); } | 3438 | // Don't save attachments for HG visitors, it |
3449 | catch (NullReferenceException) { } | 3439 | // messes up their inventory. When a HG visitor logs |
3450 | }); | 3440 | // out on a foreign grid, their attachments will be |
3451 | 3441 | // reloaded in the state they were in when they left | |
3452 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 3442 | // the home grid. This is best anyway as the visited |
3453 | if (agentTransactions != null) | 3443 | // grid may use an incompatible script engine. |
3454 | { | 3444 | if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) |
3455 | agentTransactions.RemoveAgentAssetTransactions(agentID); | 3445 | AttachmentsModule.SaveChangedAttachments(avatar, false); |
3446 | } | ||
3447 | |||
3448 | ForEachClient( | ||
3449 | delegate(IClientAPI client) | ||
3450 | { | ||
3451 | //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway | ||
3452 | try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); } | ||
3453 | catch (NullReferenceException) { } | ||
3454 | }); | ||
3456 | } | 3455 | } |
3456 | |||
3457 | // It's possible for child agents to have transactions if changes are being made cross-border. | ||
3458 | if (AgentTransactionsModule != null) | ||
3459 | AgentTransactionsModule.RemoveAgentAssetTransactions(agentID); | ||
3457 | } | 3460 | } |
3458 | finally | 3461 | finally |
3459 | { | 3462 | { |