Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem
							parent
							
								
									8c82ff16ad
								
							
						
					
					
						commit
						0688861aa7
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,63 +40,6 @@ namespace OpenSim.Framework
 | 
			
		|||
        /// </summary>
 | 
			
		||||
        private const uint FULL_MASK_PERMISSIONS_GENERAL = 2147483647;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Inventory types
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        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"
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Asset types
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue