From 6fec9c789b509a8dd2ca636edd61e5f5cd510d11 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 25 Apr 2008 21:31:40 +0000
Subject: * Check in odds and ends which remain as an attempt to get the item
properties panel for a prim's contents working * Temporarily hacked things to
bring our protocol data flow to be pretty much completely identical to the
Linden's for this - to absolutely no avail. * Leaving commented code in as a
springboard for some future attempt
---
.../Scenes/SceneObjectGroup.Inventory.cs | 5 +++
.../Region/Environment/Scenes/SceneObjectGroup.cs | 8 +++-
.../Scenes/SceneObjectPart.Inventory.cs | 52 +++++++++++++++++-----
.../Region/Environment/Scenes/SceneObjectPart.cs | 4 +-
4 files changed, 56 insertions(+), 13 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index d9808e6..efb40dd 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -151,6 +151,11 @@ namespace OpenSim.Region.Environment.Scenes
return false;
}
+ ///
+ /// Return serialized inventory metadata for the given constituent prim
+ ///
+ ///
+ ///
public void RequestInventoryFile(uint localID, IXfer xferManager)
{
SceneObjectPart part = GetChildPart(localID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index bd75e6f..7251e9c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1880,7 +1880,10 @@ namespace OpenSim.Region.Environment.Scenes
proper.ObjectData[0].FromTaskID = LLUUID.Zero;
proper.ObjectData[0].GroupID = LLUUID.Zero;
proper.ObjectData[0].InventorySerial = (short) m_rootPart.InventorySerial;
+
proper.ObjectData[0].LastOwnerID = m_rootPart.LastOwnerID;
+// proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
+
proper.ObjectData[0].ObjectID = UUID;
proper.ObjectData[0].OwnerID = m_rootPart.OwnerID;
proper.ObjectData[0].TouchName = Helpers.StringToField(m_rootPart.TouchName);
@@ -1893,6 +1896,9 @@ namespace OpenSim.Region.Environment.Scenes
proper.ObjectData[0].GroupMask = m_rootPart.GroupMask;
proper.ObjectData[0].EveryoneMask = m_rootPart.EveryoneMask;
proper.ObjectData[0].BaseMask = m_rootPart.BaseMask;
+// proper.ObjectData[0].AggregatePerms = 53;
+// proper.ObjectData[0].AggregatePermTextures = 0;
+// proper.ObjectData[0].AggregatePermTexturesOwner = 0;
client.OutPacket(proper, ThrottleOutPacketType.Task);
}
@@ -2448,4 +2454,4 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index dd361bf..63cfcbd 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -308,6 +308,7 @@ namespace OpenSim.Region.Environment.Scenes
}
m_inventorySerial++;
+ //m_inventorySerial += 2;
HasInventoryChanged = true;
}
@@ -479,9 +480,10 @@ namespace OpenSim.Region.Environment.Scenes
///
///
public void RequestInventoryFile(IXfer xferManager)
- {
+ {
byte[] fileData = new byte[0];
InventoryStringBuilder invString = new InventoryStringBuilder(m_folderID, UUID);
+ //InventoryStringBuilder invString = new InventoryStringBuilder(UUID, LLUUID.Zero);
lock (m_taskInventory)
{
@@ -489,27 +491,46 @@ namespace OpenSim.Region.Environment.Scenes
{
invString.AddItemStart();
invString.AddNameValueLine("item_id", item.ItemID.ToString());
+
invString.AddNameValueLine("parent_id", item.ParentID.ToString());
+// invString.AddNameValueLine("parent_id", UUID.ToString());
invString.AddPermissionsStart();
- invString.AddNameValueLine("base_mask", "0x7FFFFFFF");
- invString.AddNameValueLine("owner_mask", "0x7FFFFFFF");
- invString.AddNameValueLine("group_mask", "0x7FFFFFFF");
- invString.AddNameValueLine("everyone_mask", "0x7FFFFFFF");
- invString.AddNameValueLine("next_owner_mask", "0x7FFFFFFF");
+ invString.AddNameValueLine("base_mask", "7fffffff");
+ invString.AddNameValueLine("owner_mask", "7fffffff");
+
+ invString.AddNameValueLine("group_mask", "7fffffff");
+ invString.AddNameValueLine("everyone_mask", "7fffffff");
+ invString.AddNameValueLine("next_owner_mask", "7fffffff");
+// invString.AddNameValueLine("group_mask", "00000000");
+// invString.AddNameValueLine("everyone_mask", "00000000");
+// invString.AddNameValueLine("next_owner_mask", "00086000");
+
invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
invString.AddNameValueLine("owner_id", item.OwnerID.ToString());
+
invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
+// invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString());
+
invString.AddNameValueLine("group_id", item.GroupID.ToString());
invString.AddSectionEnd();
-
+
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
- invString.AddNameValueLine("flags", "0x00");
+ invString.AddNameValueLine("flags", "00000000");
+
+ invString.AddSaleStart();
+ invString.AddNameValueLine("sale_type", "not");
+ invString.AddNameValueLine("sale_price", "0");
+ invString.AddSectionEnd();
+
invString.AddNameValueLine("name", item.Name + "|");
invString.AddNameValueLine("desc", item.Description + "|");
+
invString.AddNameValueLine("creation_date", item.CreationDate.ToString());
+// invString.AddNameValueLine("creation_date", "1209151453");
+
invString.AddSectionEnd();
}
}
@@ -552,19 +573,30 @@ namespace OpenSim.Region.Environment.Scenes
AddNameValueLine("obj_id", folderID.ToString());
AddNameValueLine("parent_id", parentID.ToString());
AddNameValueLine("type", "category");
- AddNameValueLine("name", "Contents");
+ AddNameValueLine("name", "Contents|");
AddSectionEnd();
}
public void AddItemStart()
{
BuildString += "\tinv_item\t0\n";
- BuildString += "\t{\n";
+ AddSectionStart();
}
public void AddPermissionsStart()
{
BuildString += "\tpermissions 0\n";
+ AddSectionStart();
+ }
+
+ public void AddSaleStart()
+ {
+ BuildString += "\tsale_info\t0\n";
+ AddSectionStart();
+ }
+
+ protected void AddSectionStart()
+ {
BuildString += "\t{\n";
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 039029f..2357c2f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -683,7 +683,7 @@ namespace OpenSim.Region.Environment.Scenes
public SceneObjectPart()
{
// It's not necessary to persist this
- m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
+ m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp";
m_TextureAnimation = new byte[0];
}
@@ -732,7 +732,7 @@ namespace OpenSim.Region.Environment.Scenes
AngularVelocity = new LLVector3(0, 0, 0);
Acceleration = new LLVector3(0, 0, 0);
m_TextureAnimation = new byte[0];
- m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString();
+ m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp";
m_folderID = LLUUID.Random();
Flags = 0;
--
cgit v1.1