Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
        private static void Download(ChampionSpell spell, string championurl, string abilityurl)
        {
            if (spell.Slot.IsSummonerSpell())
            {
                DownloadSummonerSpells(spell, abilityurl);
            }
            else
            {
                DownloadSpell(spell, abilityurl);
            }

            DownloadChampionIcon(spell, championurl);
        }
Пример #4
0
        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);
        }