Beispiel #1
0
        static void Cmd()
        {
            string cmd = Console.ReadLine();

            if (cmd.StartsWith("getCurGame"))
            {
                string[] pieces = cmd.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
                if (pieces.Length == 2)
                {
                    string      ID     = pieces[1];
                    SummonerDto Chuvak = GetData.GetSummonerByName(ID);
                    if (Chuvak == null)
                    {
                        Out("Cant find that dude", ConsoleColor.DarkYellow);
                    }
                    else
                    {
                        CurrentGameInfo Data = GetData.GetCurrentGameInfo(Chuvak.id.ToString());
                        if (Data == null)
                        {
                            Out("Cant find game", ConsoleColor.DarkYellow);
                        }
                        else
                        {
                            Out(Data.gameMode + " " + Data.gameType, ConsoleColor.DarkCyan);
                            foreach (CurrentGameParticipant Chelik in Data.participants)
                            {
                                if (Chelik.summonerId == Chuvak.id)
                                {
                                    try
                                    {
                                        Static.ChampionDto Champ = GetData.GetChampById(Chelik.championId.ToString());
                                        Static.TempRune    Rune  = RitoPls.OfflineData.OfflineData.GetRune(Chelik.perks.perkIds[0]);
                                        Out(Champ.name + " with " + Rune.name, ConsoleColor.DarkGreen);
                                    }
                                    catch (Exception e)
                                    {
                                        Out(@"\\\\\ Exception \\\\\", ConsoleColor.DarkGray);
                                        Out(e.ToString());
                                        Out(@"/////////////////////", ConsoleColor.DarkGray);
                                        break;
                                    }
                                    break;
                                }
                            }
                        }
                    }
                }
                else
                {
                    Ebanuty();
                }
            }
            else
            {
                Ebanuty();
            }

            Cmd();
        }
Beispiel #2
0
 public static Static.TempRune GetRune(long id)
 {
     Static.TempRune Tmp = new Static.TempRune();
     Tmp.id = (int)id;
     if (RuneNames.ContainsKey(Tmp.id))
     {
         Rune TmpRune = RuneNames[Tmp.id];
         Tmp.name        = TmpRune.name;
         Tmp.description = TmpRune.description;
     }
     else
     {
         Tmp.name        = Tmp.id + " not found";
         Tmp.description = "null desc";
     }
     return(Tmp);
 }