예제 #1
0
        public List<PlayerHeroViewModel> GetHeroListForPlayerN(List<MatchDetail> matches, List<PlayerHeroViewModel> heroes, int playerIndex)
        {
            var affiliationHelper = new AffiliationHelper();

            foreach (var match in matches)
            {
                try
                {
                    var player = match.players[playerIndex];
                    var hero = heroes.Where(h => h.Name == player.hero.localized_name).FirstOrDefault();
                    if (hero != null)
                    {
                        ModifyHeroStatsBasedOnGame(match, player, hero);

                    }
                    else
                    {
                        hero = new PlayerHeroViewModel(player.hero.localized_name);
                        ModifyHeroStatsBasedOnGame(match, player, hero);
                        heroes.Add(hero);
                    }
                }
                catch {}
            }
            return heroes;
        }
예제 #2
0
        public List <PlayerHeroViewModel> GetHeroListForPlayerN(List <MatchDetail> matches, List <PlayerHeroViewModel> heroes, int playerIndex)
        {
            var affiliationHelper = new AffiliationHelper();

            foreach (var match in matches)
            {
                try
                {
                    var player = match.players[playerIndex];
                    var hero   = heroes.Where(h => h.Name == player.hero.localized_name).FirstOrDefault();
                    if (hero != null)
                    {
                        ModifyHeroStatsBasedOnGame(match, player, hero);
                    }
                    else
                    {
                        hero = new PlayerHeroViewModel(player.hero.localized_name);
                        ModifyHeroStatsBasedOnGame(match, player, hero);
                        heroes.Add(hero);
                    }
                }
                catch {}
            }
            return(heroes);
        }
예제 #3
0
 public HeroHelper()
 {
     _affiliationHelper = new AffiliationHelper();
 }
예제 #4
0
 public HeroHelper()
 {
     _affiliationHelper = new AffiliationHelper();
 }