Exemplo n.º 1
0
        public void GetMaps_Test()
        {
            var maps = api.GetMaps(Region.euw);

            Assert.IsTrue(maps.Count > 0);
        }
Exemplo n.º 2
0
        public static void UpdateAllData()
        {
            var champions = STATIC_API.GetChampions(NA);

            champions.Keys.SaveAs(CHAMPS_PATH + "ID-Name Dictionary.txt");
            foreach (var champion in champions.Champions.Values)
            {
                champion.Image.AddPath("Champions");
                champion.Passive.Image.AddPath(@"Champions\Abilities");
                for (int i = 0; i < 4; ++i)
                {
                    var spell = champion.Spells[i];
                    spell.Image.AddPath(@"Champions\Abilities");
                    var altCount = spell.Altimages.Count;
                    for (int j = 0; j < altCount; ++j)
                    {
                        spell.Altimages[j].AddPath(@"Champions\Abilities");
                    }
                }
                champion.SaveAs(CHAMPS_PATH + champion.Name + ".txt");
            }
            champions = null;

            UpdateItems();

            var maps = STATIC_API.GetMaps(NA);

            for (int i = 0; i < maps.Count; ++i)
            {
                maps[i].Image.AddPath("Maps");
            }
            maps.SaveAs(MAIN_PATH + "Maps.txt");

            /*List<ReforgedRunePathStatic> runePaths = null;
             * for (int i = 0; i < runePaths.Count; ++i)
             * {
             *  var runePath = runePaths[i];
             *  runePath.icon = @"Runes\" + Path.GetFileName(runePath.icon);
             *  string pathDir = RUNES_PATH + runePath.key;
             *  Directory.CreateDirectory(pathDir);
             *  pathDir += @"\";
             *  string iconPath = @"Runes\" + runePath.key + @"\";
             *
             *  for (int j = 0; j < runePath.slots.Count; ++j)
             *  {
             *      var slot = runePath.slots[j];
             *      var slotDirName = "Slot " + (j + 1).ToString();
             *      string slotDir = pathDir + slotDirName;
             *      Directory.CreateDirectory(slotDir);
             *      slotDir += @"\";
             *      slotDirName += @"\";
             *
             *      foreach (var rune in slot.runes)
             *      {
             *          rune.icon = iconPath + slotDirName + Path.GetFileName(rune.icon);
             *          rune.SaveAs(slotDir + rune.key + ".txt");
             *      }
             *  }
             *
             *  runePath.slots = null;
             *  runePath.SaveAs(pathDir + "PathInfo.txt");
             * }*/
        }