diff options
author | Justin Clark-Casey (justincc) | 2012-05-26 00:36:01 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-26 00:36:01 +0100 |
commit | ff53add54dbc666e585b928ba51b4babb7441611 (patch) | |
tree | c9a507f596bd6f5a56a222e2ca8e36f7e43ce02c /OpenSim/Region/Framework/Scenes | |
parent | Mantis 6028 osAvatarStopAnimation not stopping animations via UUID (diff) | |
download | opensim-SC_OLD-ff53add54dbc666e585b928ba51b4babb7441611.zip opensim-SC_OLD-ff53add54dbc666e585b928ba51b4babb7441611.tar.gz opensim-SC_OLD-ff53add54dbc666e585b928ba51b4babb7441611.tar.bz2 opensim-SC_OLD-ff53add54dbc666e585b928ba51b4babb7441611.tar.xz |
refactor: replace LSL_Api.InventoryKey(string) largely with SceneObjectPartInventory.GetInventoryItem(string)
Also gets llStopAnimation() to call KeyOrName rather than duplicating logic.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index aaf9ffa..8810903 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -582,14 +582,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
582 | return item; | 582 | return item; |
583 | } | 583 | } |
584 | 584 | ||
585 | /// <summary> | 585 | public TaskInventoryItem GetInventoryItem(string name) |
586 | /// Get inventory items by name. | 586 | { |
587 | /// </summary> | 587 | lock (m_items) |
588 | /// <param name="name"></param> | 588 | { |
589 | /// <returns> | 589 | foreach (TaskInventoryItem item in m_items.Values) |
590 | /// A list of inventory items with that name. | 590 | { |
591 | /// If no inventory item has that name then an empty list is returned. | 591 | if (item.Name == name) |
592 | /// </returns> | 592 | return item; |
593 | } | ||
594 | } | ||
595 | |||
596 | return null; | ||
597 | } | ||
598 | |||
593 | public List<TaskInventoryItem> GetInventoryItems(string name) | 599 | public List<TaskInventoryItem> GetInventoryItems(string name) |
594 | { | 600 | { |
595 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); | 601 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); |