OpenSim.Region.Framework.Scenes.UuidGatherer.GetGestureAssetUuids C# (CSharp) Method

GetGestureAssetUuids() protected method

Get the asset uuid associated with a gesture
protected GetGestureAssetUuids ( UUID gestureUuid, AssetType>.IDictionary assetUuids ) : void
gestureUuid UUID
assetUuids AssetType>.IDictionary
return void
        protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, AssetType> assetUuids)
        {
            AssetBase assetBase = GetAsset(gestureUuid);
            if (null == assetBase)
                return;

            MemoryStream ms = new MemoryStream(assetBase.Data);
            StreamReader sr = new StreamReader(ms);

            sr.ReadLine(); // Unknown (Version?)
            sr.ReadLine(); // Unknown
            sr.ReadLine(); // Unknown
            sr.ReadLine(); // Name
            sr.ReadLine(); // Comment ?
            int count = Convert.ToInt32(sr.ReadLine()); // Item count

            for (int i = 0 ; i < count ; i++)
            {
                string type = sr.ReadLine();
                if (type == null)
                    break;
                string name = sr.ReadLine();
                if (name == null)
                    break;
                string id = sr.ReadLine();
                if (id == null)
                    break;
                string unknown = sr.ReadLine();
                if (unknown == null)
                    break;

                // If it can be parsed as a UUID, it is an asset ID
                UUID uuid;
                if (UUID.TryParse(id, out uuid))
                    assetUuids[uuid] = AssetType.Animation;
            }
        }
    }