private void Form1_Load(object sender, EventArgs e) { LeagueClient lcu = new LeagueClient(); rift = new Rift(lcu); dDragon = new DDragon(); Console.WriteLine(dDragon.LastPatch()); List <string> champions = dDragon.GetAllChampions(); foreach (var champion in champions) { cmbBox_Champion.Items.Add(champion); } }
public static ChampionModel Parse(ChampionInfo championInfo, DDragon dDragon) { return(new ChampionModel { Name = championInfo.Name, Stats = championInfo.Stats.ToArray(), Title = championInfo.Title, Image = new Uri(dDragon.VersionImg.Champion(championInfo.Image.Full)), Lore = championInfo.Lore, Tag = string.Join(", ", championInfo.Tags.Select(x => x.ToString())), Tips = "Ally tips:\r\n" + string.Join("\r\n", championInfo.Allytips) + "\r\nEnemy tips:\r\n" + string.Join("\r\n", championInfo.Enemytips), Spells = championInfo.Spells.Select(x => new Uri(dDragon.VersionImg.Spell(x.Image.Full))).ToArray(), Passive = new Uri(dDragon.VersionImg.Passive(championInfo.Passive.Image.Full)), SkinCount = championInfo.Skins.Length, ToolTips = ConvertToolTips(championInfo.Passive, championInfo.Spells) }); }