示例#1
0
        public static SummonerSpellDto ReadSummonerSpellFromStaticFile(string name)
        {
            if (StaticFileExists(StaticData.SummonerSpells))
            {
                SummonerSpellListDto spells = ReadFromStaticFile <SummonerSpellListDto>(StaticData.SummonerSpells);

                foreach (SummonerSpellDto spell in spells.data.Values)
                {
                    if (spell.name == name)
                    {
                        return(spell);
                    }
                }
            }
            return(new SummonerSpellDto());
        }
示例#2
0
 protected override void ReadInfo()
 {
     SummonerSpellList = BaronReplays.RiotAPI.Services.Request.ReadFromFile(DirectoryPath + InfoFile, typeof(SummonerSpellListDto));
     DecodeData();
 }
示例#3
0
 public override bool UpdateInfo()
 {
     SummonerSpellList = BaronReplays.RiotAPI.Services.Request.GetStaticData("na/v1.2/summoner-spell?spellData=image&locale=" + Request.ApiLanguage, typeof(SummonerSpellListDto), DirectoryPath + InfoFile);
     return(SummonerSpellList != null);
 }