private static void DownloadSpell(ChampionSpell spell, string url) { var currentAbillityURI = new Uri($"{url}/{spell.SpellName}.png"); if (!_downloaded.Contains(spell.SpellName)) { Download($"{spell.Slot}.png", FileManager.ChampionFolder(spell.ChampionName), currentAbillityURI, true); _downloaded.Add(spell.SpellName); } }
private static void DownloadChampionIcon(ChampionSpell spell, string url) { var currentChampionURI = new Uri($"{url}/{spell.ChampionName}.png"); if (!_downloaded.Contains(spell.ChampionName)) { Download($"{spell.ChampionName}.png", FileManager.ChampionFolder(spell.ChampionName), currentChampionURI); _downloaded.Add(spell.ChampionName); } }
private static void Download(ChampionSpell spell, string championurl, string abilityurl) { if (spell.Slot.IsSummonerSpell()) { DownloadSummonerSpells(spell, abilityurl); } else { DownloadSpell(spell, abilityurl); } DownloadChampionIcon(spell, championurl); }
private static List <ChampionSpell> LoadChampionSpells() { var result = new List <ChampionSpell>(); foreach (var hero in EntityManager.Heroes.AllHeroes.Where(h => h.GetChampionName() != "PracticeTool_TargetDummy")) { foreach (var spell in hero.Spellbook.Spells.Where(x => Extensions.KnownSpellSlots.Contains(x.Slot))) { var newSpell = new ChampionSpell(hero.GetChampionName(), spell.GetSpellName(), spell.Slot); if (!result.Contains(newSpell)) { result.Add(newSpell); } } } return(result); }