Scripts are now copied into a prim (ie new copy placed in the prim) rather than moved into there.

This commit is contained in:
MW
2007-08-24 11:42:44 +00:00
parent a53125aae0
commit df73446bee
3 changed files with 34 additions and 9 deletions

View File

@@ -655,6 +655,33 @@ namespace OpenSim.Region.Environment.Scenes
}
public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item, LLUUID copyItemID)
{
if (copyItemID != LLUUID.Zero)
{
SceneObjectPart part = this.GetChildPart(localID);
if (part != null)
{
SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem();
taskItem.item_id = copyItemID;
taskItem.asset_id = item.assetID;
taskItem.name = item.inventoryName;
taskItem.desc = item.inventoryDescription;
taskItem.owner_id = new LLUUID(item.avatarID.ToString());
taskItem.creator_id = new LLUUID(item.creatorsID.ToString());
taskItem.type = SceneObjectPart.TaskInventoryItem.Types[item.assetType];
taskItem.inv_type = SceneObjectPart.TaskInventoryItem.Types[item.invType];
part.AddInventoryItem(taskItem);
return true;
}
}
else
{
return AddInventoryItem(remoteClient, localID, item);
}
return false;
}
public int RemoveInventoryItem(IClientAPI remoteClient, uint localID, LLUUID itemID)
{
SceneObjectPart part = this.GetChildPart(localID);