mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
a few test changes
This commit is contained in:
@@ -186,7 +186,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
if (folder is null || folder.Owner.NotEqual(remoteClient.AgentId))
|
||||
return;
|
||||
|
||||
if (transactionID.IsNotZero() && assetType != (byte)AssetType.Settings)
|
||||
if (transactionID.IsNotZero() &&
|
||||
assetType != (byte)AssetType.Settings &&
|
||||
assetType != (byte)AssetType.Material)
|
||||
{
|
||||
IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule;
|
||||
if (agentTransactions is not null)
|
||||
@@ -395,8 +397,22 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
UUID mid = data is null ? Util.ComputeSHA1UUID(UUID.ZeroString) : Util.ComputeSHA1UUID(data);
|
||||
// this may be bad
|
||||
if (mid.Equals(item.AssetID))
|
||||
return mid;
|
||||
|
||||
AssetBase matasset = new(mid, item.Name, (sbyte)item.AssetType, remoteClient.AgentId.ToString())
|
||||
{
|
||||
Description = item.Description,
|
||||
Data = data ?? (new byte[1])
|
||||
};
|
||||
item.AssetID = matasset.FullID;
|
||||
m_Scene.AssetService.Store(matasset);
|
||||
|
||||
m_Scene.InventoryService.UpdateItem(item);
|
||||
remoteClient.SendAlertMessage("Material updated");
|
||||
break;
|
||||
return matasset.FullID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user