Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem

This commit is contained in:
Justin Clark-Casey (justincc)
2011-11-25 22:15:29 +00:00
parent 8c82ff16ad
commit 0688861aa7
3 changed files with 5 additions and 61 deletions

View File

@@ -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;