aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMW2007-08-22 14:37:54 +0000
committerMW2007-08-22 14:37:54 +0000
commitb5921e2b95305d2918f94f52a560f8c004b8bcb4 (patch)
tree7deec09890e710941ec1a9d9a9f258f5ae8d1c26 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentFix for un-encrypted master avatar password in user database (diff)
downloadopensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.zip
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.gz
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.bz2
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.xz
Start of Task Inventory (ie prim's inventory). For now, you can only move scripts into a prim (from your user inventory) and although the script will now show up in the prims inventory, you can't make any changes to it (or delete it). Also a prim's inventory is currently not saved between restarts.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs39
1 files changed, 29 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2151ded..219de84 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -10,6 +10,7 @@ using libsecondlife.Packets;
10using OpenSim.Framework.Interfaces; 10using OpenSim.Framework.Interfaces;
11using OpenSim.Framework.Types; 11using OpenSim.Framework.Types;
12using OpenSim.Physics.Manager; 12using OpenSim.Physics.Manager;
13using OpenSim.Framework.Data;
13 14
14namespace OpenSim.Region.Environment.Scenes 15namespace OpenSim.Region.Environment.Scenes
15{ 16{
@@ -518,7 +519,7 @@ namespace OpenSim.Region.Environment.Scenes
518 proper.ObjectData[0].FolderID = LLUUID.Zero; 519 proper.ObjectData[0].FolderID = LLUUID.Zero;
519 proper.ObjectData[0].FromTaskID = LLUUID.Zero; 520 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
520 proper.ObjectData[0].GroupID = LLUUID.Zero; 521 proper.ObjectData[0].GroupID = LLUUID.Zero;
521 proper.ObjectData[0].InventorySerial = 0; 522 proper.ObjectData[0].InventorySerial = (short) this.m_rootPart.InventorySerial;
522 proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID; 523 proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
523 proper.ObjectData[0].ObjectID = this.UUID; 524 proper.ObjectData[0].ObjectID = this.UUID;
524 proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID; 525 proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
@@ -601,27 +602,45 @@ namespace OpenSim.Region.Environment.Scenes
601 /// </summary> 602 /// </summary>
602 /// <param name="remoteClient"></param> 603 /// <param name="remoteClient"></param>
603 /// <param name="localID"></param> 604 /// <param name="localID"></param>
604 public void GetPartInventoryFileName(IClientAPI remoteClient, uint localID) 605 public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID)
605 { 606 {
606 SceneObjectPart part = this.GetChildPrim(localID); 607 SceneObjectPart part = this.GetChildPrim(localID);
607 if (part != null) 608 if (part != null)
608 { 609 {
609 part.GetInventoryFileName(remoteClient, localID); 610 return part.GetInventoryFileName(remoteClient, localID);
610 } 611 }
612 return false;
611 } 613 }
612 614
613 /// <summary> 615 public string RequestInventoryFile(uint localID, XferManagaer xferManager)
614 /// 616 {
615 /// </summary> 617 SceneObjectPart part = this.GetChildPrim(localID);
616 /// <param name="remoteClient"></param> 618 if (part != null)
617 /// <param name="partID"></param> 619 {
618 public void RequestInventoryFile(IClientAPI remoteClient, uint localID, ulong xferID) 620 return part.RequestInventoryFile(xferManager);
621 }
622 return "";
623 }
624
625 public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item)
619 { 626 {
620 SceneObjectPart part = this.GetChildPrim(localID); 627 SceneObjectPart part = this.GetChildPrim(localID);
621 if (part != null) 628 if (part != null)
622 { 629 {
623 part.RequestInventoryFile(remoteClient, xferID); 630 SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem();
631 taskItem.item_id = item.inventoryID;
632 taskItem.asset_id = item.assetID;
633 taskItem.name = item.inventoryName;
634 taskItem.desc = item.inventoryDescription;
635 taskItem.owner_id = item.avatarID;
636 taskItem.creator_id = item.creatorsID;
637 taskItem.type = taskItem.AssetTypes[item.assetType];
638 taskItem.inv_type = taskItem.AssetTypes[item.invType];
639 part.AddInventoryItem(taskItem);
640 return true;
624 } 641 }
642 return false;
643
625 } 644 }
626 645
627 /// <summary> 646 /// <summary>