Esempio n. 1
0
 public void update()
 {
     try
     {
         addAPIAccount(RiotAPI.GetAccountFromPuuId <API.APIAccount>(this.server, this.puuId));
         addAPIRank(RiotAPI.GetRankFromId <API.APIRank>(this.server, this.id));
     } catch (Exception) { findNewServer(); }
 }
Esempio n. 2
0
        private void findNewServer()
        {
            List <string> servers = new List <string> {
                "EUW1", "NA1", "EUN1", "TR1", "LA1", "OC", "RU", "KR", "LA2", "JP1", "BR"
            };

            foreach (string server in servers)
            {
                try
                {
                    addAPIAccount(RiotAPI.GetAccountFromPuuId <API.APIAccount>(server, this.puuId));
                }
                catch (Exception) { }

                try
                {
                    addAPIRank(RiotAPI.GetRankFromId <API.APIRank>(this.server, this.id));
                } catch (Exception) { }
            }
        }