mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Merge branch 'avination' into careminster
Conflicts: OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs OpenSim/Region/Framework/Scenes/Scene.cs
This commit is contained in:
@@ -663,7 +663,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
//
|
||||
// This sleep can be increased if necessary. However, whilst it's active,
|
||||
// an agent cannot teleport back to this region if it has teleported away.
|
||||
Thread.Sleep(2000);
|
||||
Thread.Sleep(3000);
|
||||
|
||||
sp.Scene.IncomingCloseAgent(sp.UUID, false);
|
||||
}
|
||||
|
||||
@@ -186,45 +186,44 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
if (folder == null || folder.Owner != remoteClient.AgentId)
|
||||
return;
|
||||
|
||||
if (transactionID == UUID.Zero)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (m_Scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
byte[] data = null;
|
||||
|
||||
if (invType == (sbyte)InventoryType.Landmark && presence != null)
|
||||
{
|
||||
string suffix = string.Empty, prefix = string.Empty;
|
||||
string strdata = GenerateLandmark(presence, out prefix, out suffix);
|
||||
data = Encoding.ASCII.GetBytes(strdata);
|
||||
name = prefix + name;
|
||||
description += suffix;
|
||||
}
|
||||
|
||||
AssetBase asset = m_Scene.CreateAsset(name, description, assetType, data, remoteClient.AgentId);
|
||||
m_Scene.AssetService.Store(asset);
|
||||
m_Scene.CreateNewInventoryItem(
|
||||
remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID,
|
||||
name, description, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[INVENTORY ACCESS MODULE]: ScenePresence for agent uuid {0} unexpectedly not found in CreateNewInventoryItem",
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (transactionID != UUID.Zero)
|
||||
{
|
||||
IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule;
|
||||
if (agentTransactions != null)
|
||||
{
|
||||
agentTransactions.HandleItemCreationFromTransaction(
|
||||
if (agentTransactions.HandleItemCreationFromTransaction(
|
||||
remoteClient, transactionID, folderID, callbackID, description,
|
||||
name, invType, assetType, wearableType, nextOwnerMask);
|
||||
name, invType, assetType, wearableType, nextOwnerMask))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ScenePresence presence;
|
||||
if (m_Scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
{
|
||||
byte[] data = null;
|
||||
|
||||
if (invType == (sbyte)InventoryType.Landmark && presence != null)
|
||||
{
|
||||
string suffix = string.Empty, prefix = string.Empty;
|
||||
string strdata = GenerateLandmark(presence, out prefix, out suffix);
|
||||
data = Encoding.ASCII.GetBytes(strdata);
|
||||
name = prefix + name;
|
||||
description += suffix;
|
||||
}
|
||||
|
||||
AssetBase asset = m_Scene.CreateAsset(name, description, assetType, data, remoteClient.AgentId);
|
||||
m_Scene.AssetService.Store(asset);
|
||||
m_Scene.CreateNewInventoryItem(
|
||||
remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID,
|
||||
name, description, 0, callbackID, asset, invType, nextOwnerMask, creationDate,transactionID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[INVENTORY ACCESS MODULE]: ScenePresence for agent uuid {0} unexpectedly not found in CreateNewInventoryItem",
|
||||
remoteClient.AgentId);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix)
|
||||
|
||||
Reference in New Issue
Block a user