示例#1
0
 public string RequestGameList(int mode, Chars player, string region)
 {
     int lad = 0;
     if (player.Lad == "LADDER CHARACTER")
         lad = 1;
     string hold = sendPost(EncryptString("4|" + hash + "|" + lad + "|" + region + "|" + mode + "|" + HandlerClass.Instance.FilterDiff));
     string[] egame = hold.Split('|');
     string dgame = string.Empty;
     for (int i = 0; i < egame.Length; i++ )
     {
         dgame += AES_decrypt(egame[i]) + "|";
     }
         return dgame;
 }
示例#2
0
 public bool CreateGame(string game, string pass, HandlerClass.dif diff, Chars Char, string desc, string region)
 {
     try
     {
         int lad = 0;
         if (Char.Lad == "LADDER CHARACTER")
             lad = 1;
         string hold;
         string enc = EncryptString("2|" + game + "|" + pass + "|" + diff.ToString() + "|" + Char.Name + " [" + Char.ClassLevel + "]" + "|" + lad + "|" + desc + "|" + region + "|" + Hash);
         hold = "2|" + game + "|" + pass + "|" + diff.ToString() + "|" + Char.Name + "|" + desc + "|" + region + "|" + Hash;
         hold = AES_decrypt(sendPost(enc));
         HandlerClass.Instance.console.SendToConsole(hold);
         return true;
     }
     catch {return false;}
 }
示例#3
0
 public bool JoinGame(int id, Chars Char)
 {
     try
     {
         sendPost(EncryptString("5|" + id + "|" + Char.Name + " [" + Char.ClassLevel + "]" + "|" + Hash));
         return true;
     }
     catch { return false; }
 }
示例#4
0
 private void SetCharacters(string CharInfo)
 {
     CharInfo = CharInfo.Replace(@"\", "");
     console.SendToConsole("Got Char: " + CharInfo);
     CharInfo = CharInfo.Replace(@"[", "");
     CharInfo = CharInfo.Replace(@"]", "");
     Chars chars = new Chars();
     string[] tmpChar = CharInfo.Split(',');
     chars.rank = tmpChar[0];
     chars.Name = tmpChar[1];
     chars.ClassLevel = tmpChar[2];
     chars.Exp = tmpChar[3];
     try { chars.Lad = tmpChar[4]; }
     catch { chars.Lad = ""; }
     try { chars.Expire = tmpChar[5]; }
     catch { chars.Expire = ""; }
     Characters.Add(chars);
 }