|
@@ -135,19 +135,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID, bool withModRights = true)
|
|
public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID, bool withModRights = true)
|
|
{
|
|
{
|
|
-// m_log.DebugFormat(
|
|
|
|
-// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}",
|
|
|
|
-// item.Name, remoteClient.Name, localID);
|
|
|
|
|
|
+ //m_log.DebugFormat(
|
|
|
|
+ // "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}",
|
|
|
|
+ // item.Name, remoteClient.Name, localID);
|
|
|
|
|
|
UUID newItemId = copyItemID.IsZero() ? item.ID : copyItemID;
|
|
UUID newItemId = copyItemID.IsZero() ? item.ID : copyItemID;
|
|
|
|
|
|
SceneObjectPart part = GetPart(localID);
|
|
SceneObjectPart part = GetPart(localID);
|
|
if (part is null)
|
|
if (part is null)
|
|
{
|
|
{
|
|
- m_log.ErrorFormat(
|
|
|
|
- "[PRIM INVENTORY]: " +
|
|
|
|
- "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}",
|
|
|
|
- localID, Name, UUID, newItemId);
|
|
|
|
|
|
+ m_log.Error(
|
|
|
|
+ $"[PRIM INVENTORY]: Couldn't find prim local ID {localID} in group {Name}, {UUID} to add inventory item ID {newItemId}");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -156,6 +154,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|
ItemID = newItemId,
|
|
ItemID = newItemId,
|
|
AssetID = item.AssetID,
|
|
AssetID = item.AssetID,
|
|
Name = item.Name,
|
|
Name = item.Name,
|
|
|
|
+ //CreationDate = (uint)Util.UnixTimeSinceEpoch(),
|
|
Description = item.Description,
|
|
Description = item.Description,
|
|
OwnerID = part.OwnerID, // Transfer ownership
|
|
OwnerID = part.OwnerID, // Transfer ownership
|
|
CreatorID = item.CreatorIdAsUuid,
|
|
CreatorID = item.CreatorIdAsUuid,
|
|
@@ -193,7 +192,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|
// TODO: These are pending addition of those fields to TaskInventoryItem
|
|
// TODO: These are pending addition of those fields to TaskInventoryItem
|
|
// taskItem.SalePrice = item.SalePrice;
|
|
// taskItem.SalePrice = item.SalePrice;
|
|
// taskItem.SaleType = item.SaleType;
|
|
// taskItem.SaleType = item.SaleType;
|
|
- taskItem.CreationDate = (uint)item.CreationDate;
|
|
|
|
|
|
|
|
bool addFromAllowedDrop;
|
|
bool addFromAllowedDrop;
|
|
if(withModRights)
|
|
if(withModRights)
|