If a prim is persisted in the region, scripts dragged into its inventory after a server restart would not appear (though the script they contain would still be invoked). This

change fixes that problem.
afrisby
Justin Clarke Casey 2007-12-26 20:21:06 +00:00
parent f852b64555
commit 01de4bbfbd
3 changed files with 15 additions and 5 deletions

View File

@ -499,7 +499,8 @@ namespace OpenSim.Region.Environment.Scenes
} }
/// <summary> /// <summary>
/// Update an item in a prim (task) inventory /// Update an item in a prim (task) inventory.
/// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see>
/// </summary> /// </summary>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
/// <param name="itemID"></param> /// <param name="itemID"></param>

View File

@ -1152,6 +1152,13 @@ namespace OpenSim.Region.Environment.Scenes
{ {
return part.GetInventoryFileName(remoteClient, localID); return part.GetInventoryFileName(remoteClient, localID);
} }
else
{
MainLog.Instance.Warn(
"SCENE",
"Couldn't find part {0} in object group {1} ({2}) to retreive prim inventory",
localID, LocalId, UUID);
}
return false; return false;
} }

View File

@ -420,10 +420,12 @@ namespace OpenSim.Region.Environment.Scenes
#region Constructors #region Constructors
/// <summary> /// <summary>
/// /// No arg constructor called by region restore db code
/// </summary> /// </summary>
public SceneObjectPart() public SceneObjectPart()
{ {
// It's not necessary to persist this
m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
} }
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
@ -1006,8 +1008,8 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="localID"></param> /// <param name="localID"></param>
public bool GetInventoryFileName(IClientAPI client, uint localID) public bool GetInventoryFileName(IClientAPI client, uint localID)
{ {
if (localID == m_localID) // if (localID == m_localID)
{ // {
if (m_inventorySerial > 0) if (m_inventorySerial > 0)
{ {
client.SendTaskInventory(m_uuid, (short)m_inventorySerial, client.SendTaskInventory(m_uuid, (short)m_inventorySerial,
@ -1019,7 +1021,7 @@ namespace OpenSim.Region.Environment.Scenes
client.SendTaskInventory(m_uuid, 0, new byte[0]); client.SendTaskInventory(m_uuid, 0, new byte[0]);
return false; return false;
} }
} // }
return false; return false;
} }