예제 #1
0
파일: Network.cs 프로젝트: Gunzmo/Diablo2NG
 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
파일: Network.cs 프로젝트: Gunzmo/Diablo2NG
 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
파일: Network.cs 프로젝트: Gunzmo/Diablo2NG
 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);
 }