diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 17dbcd5c7d..52b5f2c86c 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -235,10 +235,11 @@ namespace OpenSim.Capabilities.Handlers
llsdFolder.folder_id = invFolder.ID;
llsdFolder.parent_id = invFolder.ParentID;
llsdFolder.name = invFolder.Name;
- if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
+
+ if (!Enum.IsDefined(typeof(AssetType), invFolder.Type))
llsdFolder.type = "-1";
else
- llsdFolder.type = TaskInventoryItem.Types[invFolder.Type];
+ llsdFolder.type = Utils.AssetTypeToString((AssetType)invFolder.Type);
llsdFolder.preferred_type = "-1";
return llsdFolder;
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index 30d775cf6a..ba2a306c4e 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -40,63 +40,6 @@ namespace OpenSim.Framework
///
private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
- ///
- /// Inventory types
- ///
- public static string[] InvTypes = new string[]
- {
- "texture",
- "sound",
- "calling_card",
- "landmark",
- String.Empty,
- String.Empty,
- "object",
- "notecard",
- String.Empty,
- String.Empty,
- "lsl_text",
- String.Empty,
- String.Empty,
- "bodypart",
- String.Empty,
- "snapshot",
- String.Empty,
- String.Empty,
- "wearable",
- "animation",
- "gesture"
- };
-
- ///
- /// Asset types
- ///
- public static string[] Types = new string[]
- {
- "texture",
- "sound",
- "callcard",
- "landmark",
- "clothing", // Deprecated
- "clothing",
- "object",
- "notecard",
- "category",
- "root",
- "lsltext",
- "lslbyte",
- "txtr_tga",
- "bodypart",
- "trash",
- "snapshot",
- "lstndfnd",
- "snd_wav",
- "img_tga",
- "jpeg",
- "animatn",
- "gesture"
- };
-
private UUID _assetID = UUID.Zero;
private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d80944b554..daddb90684 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -832,8 +832,8 @@ namespace OpenSim.Region.Framework.Scenes
invString.AddSectionEnd();
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
- invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
- invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
+ invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
+ invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
invString.AddSaleStart();