* 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
0.6.0-stable
Justin Clarke Casey 2008-04-25 21:31:40 +00:00
parent 298870b177
commit 6fec9c789b
4 changed files with 56 additions and 13 deletions

View File

@ -151,6 +151,11 @@ namespace OpenSim.Region.Environment.Scenes
return false;
}
/// <summary>
/// Return serialized inventory metadata for the given constituent prim
/// </summary>
/// <param name="localID"></param>
/// <param name="xferManager"></param>
public void RequestInventoryFile(uint localID, IXfer xferManager)
{
SceneObjectPart part = GetChildPart(localID);

View File

@ -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
}
}
}
}
}

View File

@ -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
/// </summary>
/// <param name="xferManager"></param>
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";
}

View File

@ -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;