Fixed handling of inventory a bit

- AssetType isn't InventoryType. Those enums contain different numbers. Use AssetType for the asset type, InventoryType for the inventory type.
- The ToString method (or ToLower) of AssetType/InventoryType doesn't necessarily return the correct LLSD string.
- Replaced several magic numbers by their corresponding enum.
- Fixed the invType for gestures and animations in the library.
This should fix Mantis #3610 and the non-terminating inventory loading
This commit is contained in:
Homer Horwitz
2009-05-09 21:11:12 +00:00
parent c534d7f614
commit 1d234ca83f
7 changed files with 57 additions and 49 deletions

View File

@@ -1351,8 +1351,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
taskItem.CreationDate = (uint)Util.UnixTimeSinceEpoch();
taskItem.Name = asset.Name;
taskItem.Description = asset.Description;
taskItem.Type = 7;
taskItem.InvType = 7;
taskItem.Type = (int)AssetType.Notecard;
taskItem.InvType = (int)InventoryType.Notecard;
taskItem.OwnerID = m_host.OwnerID;
taskItem.CreatorID = m_host.OwnerID;
taskItem.BasePermissions = (uint)PermissionMask.All;