If dragging a script that is no copy from prim inventory into agent
inventory, stop it first in scene. If deleting from prims, move to trash rather then making it poof.avinationmerge
parent
db482cb7dd
commit
31dc5aa728
|
@ -996,6 +996,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (item == null)
|
if (item == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder);
|
||||||
|
|
||||||
|
// Move the item to trash. If this is a copiable item, only
|
||||||
|
// a copy will be moved and we will still need to delete
|
||||||
|
// the item from the prim. If it was no copy, is will be
|
||||||
|
// deleted by this method.
|
||||||
|
MoveTaskInventoryItem(remoteClient, destFolder.ID, part, itemID);
|
||||||
|
|
||||||
|
if (group.GetInventoryItem(localID, itemID) != null)
|
||||||
|
{
|
||||||
if (item.Type == 10)
|
if (item.Type == 10)
|
||||||
{
|
{
|
||||||
part.RemoveScriptEvents(itemID);
|
part.RemoveScriptEvents(itemID);
|
||||||
|
@ -1003,6 +1013,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
group.RemoveInventoryItem(localID, itemID);
|
group.RemoveInventoryItem(localID, itemID);
|
||||||
|
}
|
||||||
part.SendPropertiesToClient(remoteClient);
|
part.SendPropertiesToClient(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1065,8 +1076,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (!Permissions.BypassPermissions())
|
if (!Permissions.BypassPermissions())
|
||||||
{
|
{
|
||||||
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
|
{
|
||||||
|
if (taskItem.Type == 10)
|
||||||
|
{
|
||||||
|
part.RemoveScriptEvents(itemId);
|
||||||
|
EventManager.TriggerRemoveScript(part.LocalId, itemId);
|
||||||
|
}
|
||||||
|
|
||||||
part.Inventory.RemoveInventoryItem(itemId);
|
part.Inventory.RemoveInventoryItem(itemId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return agentItem;
|
return agentItem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue