mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Record the fact that child agents can have asset transactions.
Also change code to grab the agent asset transaction module once.
This commit is contained in:
@@ -440,10 +440,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
||||
if (agentTransactions != null)
|
||||
if (AgentTransactionsModule != null)
|
||||
{
|
||||
agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
|
||||
AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1532,21 +1531,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
|
||||
// case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
|
||||
// will not pass in a transaction ID in the update message.
|
||||
if (transactionID != UUID.Zero)
|
||||
if (transactionID != UUID.Zero && AgentTransactionsModule != null)
|
||||
{
|
||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
||||
if (agentTransactions != null)
|
||||
{
|
||||
agentTransactions.HandleTaskItemUpdateFromTransaction(
|
||||
remoteClient, part, transactionID, currentItem);
|
||||
|
||||
if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
|
||||
remoteClient.SendAgentAlertMessage("Notecard saved", false);
|
||||
else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
|
||||
remoteClient.SendAgentAlertMessage("Script saved", false);
|
||||
else
|
||||
remoteClient.SendAgentAlertMessage("Item saved", false);
|
||||
}
|
||||
AgentTransactionsModule.HandleTaskItemUpdateFromTransaction(
|
||||
remoteClient, part, transactionID, currentItem);
|
||||
|
||||
if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
|
||||
remoteClient.SendAgentAlertMessage("Notecard saved", false);
|
||||
else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
|
||||
remoteClient.SendAgentAlertMessage("Script saved", false);
|
||||
else
|
||||
remoteClient.SendAgentAlertMessage("Item saved", false);
|
||||
}
|
||||
|
||||
// Base ALWAYS has move
|
||||
|
||||
@@ -499,6 +499,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public IAttachmentsModule AttachmentsModule { get; set; }
|
||||
public IEntityTransferModule EntityTransferModule { get; private set; }
|
||||
public IAgentAssetTransactions AgentTransactionsModule { get; private set; }
|
||||
|
||||
public IAvatarFactoryModule AvatarFactory
|
||||
{
|
||||
@@ -1241,6 +1242,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
|
||||
EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
|
||||
m_groupsModule = RequestModuleInterface<IGroupsModule>();
|
||||
AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -3297,12 +3299,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
catch (NullReferenceException) { }
|
||||
});
|
||||
}
|
||||
|
||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
||||
if (agentTransactions != null)
|
||||
{
|
||||
agentTransactions.RemoveAgentAssetTransactions(agentID);
|
||||
}
|
||||
|
||||
// It's possible for child agents to have transactions if changes are being made cross-border.
|
||||
if (AgentTransactionsModule != null)
|
||||
AgentTransactionsModule.RemoveAgentAssetTransactions(agentID);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user