Przeglądaj źródła

prim inv item creation date is date of adding to prim

UbitUmarov 1 tydzień temu
rodzic
commit
0a0e1ea0b1

+ 1 - 1
OpenSim/Framework/TaskInventoryItem.cs

@@ -172,7 +172,7 @@ namespace OpenSim.Framework
         public TaskInventoryItem()
         {
             ScriptRunning = true;
-            CreationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
+            CreationDate = (uint)Util.UnixTimeSinceEpoch();
         }
     }
 }

+ 6 - 8
OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs

@@ -135,19 +135,17 @@ namespace OpenSim.Region.Framework.Scenes
         /// <returns></returns>
         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;
 
             SceneObjectPart part = GetPart(localID);
             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;
             }
 
@@ -156,6 +154,7 @@ namespace OpenSim.Region.Framework.Scenes
                 ItemID = newItemId,
                 AssetID = item.AssetID,
                 Name = item.Name,
+                //CreationDate = (uint)Util.UnixTimeSinceEpoch(),
                 Description = item.Description,
                 OwnerID = part.OwnerID, // Transfer ownership
                 CreatorID = item.CreatorIdAsUuid,
@@ -193,7 +192,6 @@ namespace OpenSim.Region.Framework.Scenes
             // TODO: These are pending addition of those fields to TaskInventoryItem
             // taskItem.SalePrice = item.SalePrice;
             // taskItem.SaleType = item.SaleType;
-            taskItem.CreationDate = (uint)item.CreationDate;
                 
             bool addFromAllowedDrop;
             if(withModRights)