mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part.
This commit is contained in:
@@ -96,7 +96,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID;
|
||||
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
TaskInventoryItem taskItem = new TaskInventoryItem();
|
||||
@@ -170,7 +170,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns>null if the item does not exist</returns>
|
||||
public TaskInventoryItem GetInventoryItem(uint primID, UUID itemID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(primID);
|
||||
SceneObjectPart part = GetPart(primID);
|
||||
if (part != null)
|
||||
{
|
||||
return part.Inventory.GetInventoryItem(itemID);
|
||||
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns>false if the item did not exist, true if the update occurred succesfully</returns>
|
||||
public bool UpdateInventoryItem(TaskInventoryItem item)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(item.ParentPartID);
|
||||
SceneObjectPart part = GetPart(item.ParentPartID);
|
||||
if (part != null)
|
||||
{
|
||||
part.Inventory.UpdateInventoryItem(item);
|
||||
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public int RemoveInventoryItem(uint localID, UUID itemID)
|
||||
{
|
||||
SceneObjectPart part = GetChildPart(localID);
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part != null)
|
||||
{
|
||||
int type = part.Inventory.RemoveInventoryItem(itemID);
|
||||
|
||||
Reference in New Issue
Block a user