Minor refactoring to expose PrimInventory from SceneObjectPart

afrisby
Justin Clarke Casey 2008-01-02 22:05:10 +00:00
parent a72d33d3a5
commit 78ba9cebc5
1 changed files with 15 additions and 7 deletions

View File

@ -60,7 +60,15 @@ namespace OpenSim.Region.Environment.Scenes
[XmlIgnore] public PhysicsActor PhysActor = null; [XmlIgnore] public PhysicsActor PhysActor = null;
protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>(); // Holds in memory prim inventory
protected Dictionary<LLUUID, TaskInventoryItem> m_taskInventory
= new Dictionary<LLUUID, TaskInventoryItem>();
public Dictionary<LLUUID, TaskInventoryItem> TaskInventory
{
get { return m_taskInventory; }
}
public LLUUID LastOwnerID; public LLUUID LastOwnerID;
public LLUUID OwnerID; public LLUUID OwnerID;
public LLUUID GroupID; public LLUUID GroupID;
@ -76,7 +84,7 @@ namespace OpenSim.Region.Environment.Scenes
private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1);
private LLUUID m_SitTargetAvatar = LLUUID.Zero; private LLUUID m_SitTargetAvatar = LLUUID.Zero;
//
// Main grid has default permissions as follows // Main grid has default permissions as follows
// //
public uint OwnerMask = FULL_MASK_PERMISSIONS_OWNER; public uint OwnerMask = FULL_MASK_PERMISSIONS_OWNER;
@ -1048,7 +1056,7 @@ namespace OpenSim.Region.Environment.Scenes
item.parent_id = m_folderID; item.parent_id = m_folderID;
item.creation_date = 1000; item.creation_date = 1000;
item.ParentPartID = UUID; item.ParentPartID = UUID;
TaskInventory.Add(item.item_id, item); m_taskInventory.Add(item.item_id, item);
m_inventorySerial++; m_inventorySerial++;
} }
@ -1056,10 +1064,10 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (localID == LocalID) if (localID == LocalID)
{ {
if (TaskInventory.ContainsKey(itemID)) if (m_taskInventory.ContainsKey(itemID))
{ {
string type = TaskInventory[itemID].inv_type; string type = m_taskInventory[itemID].inv_type;
TaskInventory.Remove(itemID); m_taskInventory.Remove(itemID);
m_inventorySerial++; m_inventorySerial++;
if (type == "lsltext") if (type == "lsltext")
{ {
@ -1098,7 +1106,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
byte[] fileData = new byte[0]; byte[] fileData = new byte[0];
InventoryStringBuilder invString = new InventoryStringBuilder(m_folderID, UUID); InventoryStringBuilder invString = new InventoryStringBuilder(m_folderID, UUID);
foreach (TaskInventoryItem item in TaskInventory.Values) foreach (TaskInventoryItem item in m_taskInventory.Values)
{ {
invString.AddItemStart(); invString.AddItemStart();
invString.AddNameValueLine("item_id", item.item_id.ToString()); invString.AddNameValueLine("item_id", item.item_id.ToString());