mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
remove redundant osInventoryDescription() and improve osInventoryDesc() to do the same
This commit is contained in:
@@ -3889,29 +3889,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the description from an inventory item
|
||||
/// </summary>
|
||||
/// <param name="inventoryName"></param>
|
||||
/// <returns>Item description</returns>
|
||||
public LSL_String osGetInventoryDesc(string item)
|
||||
{
|
||||
CheckThreatLevel();
|
||||
|
||||
lock (m_host.TaskInventory)
|
||||
{
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
{
|
||||
if (inv.Value.Name == item)
|
||||
{
|
||||
return inv.Value.Description.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invite user to the group this object is set to
|
||||
/// </summary>
|
||||
@@ -5439,7 +5416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return item.Name;
|
||||
}
|
||||
|
||||
public LSL_String osGetInventoryDescription(LSL_String itemNameorid)
|
||||
public LSL_String osGetInventoryDesc(LSL_String itemNameorid)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user