예제 #1
0
        /// <summary>
        /// <para>Returns a app DLC metadata object for the specified index.</para>
        /// <a href="https://partner.steamgames.com/doc/api/ISteamApps#BGetDLCDataByIndex">https://partner.steamgames.com/doc/api</a>
        /// </summary>
        /// <returns></returns>
        public static AppDlcData GetDLCDataByIndex(int index)
        {
            var nData = new AppDlcData();

            if (SteamApps.BGetDLCDataByIndex(index, out nData.appId, out nData.available, out nData.name, 2048))
            {
                return(nData);
            }
            else
            {
                nData.appId = AppId_t.Invalid;
                return(nData);
            }
        }
예제 #2
0
        /// <summary>
        /// <para>Returns a collection of app DLC metadata for all available DLC.</para>
        /// <a href="https://partner.steamgames.com/doc/api/ISteamApps#BGetDLCDataByIndex">https://partner.steamgames.com/doc/api</a>
        /// </summary>
        /// <returns></returns>
        public static List <AppDlcData> GetDLCData()
        {
            var results = new List <AppDlcData>();
            var count   = GetDLCCount();

            for (int i = 0; i < count; i++)
            {
                var nData = new AppDlcData();
                if (SteamApps.BGetDLCDataByIndex(i, out nData.appId, out nData.available, out nData.name, 2048))
                {
                    results.Add(nData);
                }
            }
            return(results);
        }