diff --git a/Dota2Banlist/Program.cs b/Dota2Banlist/Program.cs index 661f7a6..b606358 100644 --- a/Dota2Banlist/Program.cs +++ b/Dota2Banlist/Program.cs @@ -150,8 +150,8 @@ static void Main() var player = summaries.Players.Single(p => object.Equals(p.SteamId, ids[i])); var psa = new PlayerServiceApi(steamKey); - var dota = psa.GetOwnedGames(ids[i], 570); - var game = dota.Games != null ? psa.GetOwnedGames(ids[i], 570).Games.FirstOrDefault(g => g.AppId == 570) : null; + var dota = psa.GetOwnedGames(ids[i], (int)Dota2BanlistCore.Steam.Api.Enums.GameId.Dota2); + var game = dota.Games != null ? psa.GetOwnedGames(ids[i], (int)Dota2BanlistCore.Steam.Api.Enums.GameId.Dota2).Games.FirstOrDefault(g => g.AppId == (int)Dota2BanlistCore.Steam.Api.Enums.GameId.Dota2) : null; var friends = player.CommunityVisibilityState == 3 ? api.GetFriendList(ids[i]).Friends : null; var friendsInGame = friends != null ? friends.Select(f => summaries.Players.SingleOrDefault(p => object.Equals(p.SteamId, f.SteamId))).Where(f => f != null).ToList() : new List(); diff --git a/Dota2BanlistCore/Dota2BanlistCore.csproj b/Dota2BanlistCore/Dota2BanlistCore.csproj index e85b2d8..f107908 100644 --- a/Dota2BanlistCore/Dota2BanlistCore.csproj +++ b/Dota2BanlistCore/Dota2BanlistCore.csproj @@ -103,6 +103,7 @@ + True diff --git a/Dota2BanlistCore/Steam/Api/Enums.cs b/Dota2BanlistCore/Steam/Api/Enums.cs new file mode 100644 index 0000000..6c7abd7 --- /dev/null +++ b/Dota2BanlistCore/Steam/Api/Enums.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Dota2BanlistCore.Steam.Api +{ + public static class Enums + { + public enum GameId + { + Dota2 = 570, + } + } +}