示例#1
0
 private void method_15(GClass91 gclass91_0, ErrorReason errorReason_0, Exception exception_0 = null)
 {
     if (errorReason_0 != ErrorReason.VersionMismatch && this.bEyMqhdnuGd.method_0())
     {
         this.gameManager_0.Start();
     }
 }
示例#2
0
 private void method_11(GClass91 gclass91_1, BinaryStream binaryStream_0, byte[] byte_0, int int_1)
 {
     if (!this.method_3())
     {
         this.method_5().method_10(binaryStream_0, byte_0, int_1);
     }
 }
示例#3
0
        private void method_5(GClass91 gclass91_0, ErrorReason errorReason_0, Exception exception_0)
        {
            this.PingMeasurements.Clear();
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;

            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs("PingMs"));
            }
            this.IsAuthenticated = false;
            this._sentPings      = 0;
            this._keepAlive      = false;
        }
示例#4
0
 private void method_10(GClass91 gclass91_1, ErrorReason errorReason_0, Exception exception_0)
 {
     if (!this.bool_1)
     {
         this.Disconnect(errorReason_0, exception_0, true);
     }
     this.bool_1 = true;
     GClass91.GClass92.GDelegate6 disconnected = this.Disconnected;
     if (disconnected == null)
     {
         return;
     }
     disconnected(gclass91_1, errorReason_0, exception_0);
 }
示例#5
0
        private void VjydPsYqpQ(GClass91 gclass91_0)
        {
            this.PingMeasurements.Clear();
            this._lastKeepAlive  = DateTime.Now;
            this._keepAlive      = false;
            this._sentPings      = 0;
            this.IsAuthenticated = false;
            this.method_6();
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;

            if (propertyChanged == null)
            {
                return;
            }
            propertyChanged(this, new PropertyChangedEventArgs("PingMs"));
        }
示例#6
0
        private void method_6(GClass91 gclass91_0)
        {
            gclass91_0.method_3().GetStream().WriteByte(0);
            this.PingMeasurements.Clear();
            this._lastKeepAlive  = DateTime.Now;
            this._keepAlive      = false;
            this._sentPings      = 0;
            this.IsAuthenticated = false;
            this.method_7();
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;

            if (propertyChanged == null)
            {
                return;
            }
            propertyChanged(this, new PropertyChangedEventArgs("PingMs"));
        }
示例#7
0
 public void method_8(GClass91 gclass91_1, aYQcxEOxrdELca8ma1k GMErF1OdPH3xOaU7d1f)
 {
     this.TtkyDcfqox();
     this.Socket = gclass91_1;
     try
     {
         aYQcxEOxrdELca8ma1k aYQcxEOxrdELca8ma1k = this.method_4();
         if (aYQcxEOxrdELca8ma1k != null)
         {
             aYQcxEOxrdELca8ma1k.imethod_2();
         }
     }
     catch
     {
     }
     this.wOhyxbakoy(GMErF1OdPH3xOaU7d1f);
 }
示例#8
0
 public void method_9(GClass91 gclass91_1, mEx4t12ZDFVtTbDWQkm Y9cFY22S0fluVweHlXH)
 {
     this.method_11();
     this.Socket = gclass91_1;
     try
     {
         mEx4t12ZDFVtTbDWQkm mEx4t12ZDFVtTbDWQkm = this.method_4();
         if (mEx4t12ZDFVtTbDWQkm != null)
         {
             mEx4t12ZDFVtTbDWQkm.imethod_2();
         }
     }
     catch
     {
     }
     this.method_5(Y9cFY22S0fluVweHlXH);
 }
示例#9
0
    public void Connect(string host, int port, bool forceNonLoopback = true, ProxySettings proxySettings = null)
    {
        this.method_8();
        this.method_4(new TcpClient());
        if (proxySettings != null)
        {
            try
            {
                GClass124 gclass = new GClass124(proxySettings.Host, proxySettings.Port, proxySettings.User, proxySettings.Password);
                this.method_4(gclass.imethod_7(host, port));
                goto IL_AC;
            }
            catch (Exception exception)
            {
                GClass91.GClass92.GDelegate6 disconnected = this.Disconnected;
                if (disconnected != null)
                {
                    disconnected(this, ErrorReason.ProxyError, exception);
                }
                return;
            }
        }
        if (forceNonLoopback)
        {
            this.method_3().Client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            GClass91.smethod_0(this.method_3().Client);
        }
        try
        {
            this.method_3().Connect(host, port);
        }
        catch (Exception exception2)
        {
            GClass91.GClass92.GDelegate6 disconnected2 = this.Disconnected;
            if (disconnected2 != null)
            {
                disconnected2(this, ErrorReason.ConnectionLost, exception2);
            }
            return;
        }
IL_AC:
        this.method_6(new Thread(new ThreadStart(this.method_7)));
        this.method_5().IsBackground = true;
        this.method_5().Start();
    }
示例#10
0
 private void method_10(GClass91 gclass91_0, BinaryStream binaryStream_0, byte[] byte_0, int int_0)
 {
     if (this.method_1() == IntPtr.Zero)
     {
         this.method_2(GClass927.GetForegroundWindow());
     }
     if (int_0 == 23 && Encoding.UTF8.GetString(byte_0).Contains("policy"))
     {
         byte[] bytes = Encoding.ASCII.GetBytes("<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>\0");
         gclass91_0.method_3().GetStream().Write(bytes, 0, bytes.Length);
         try
         {
             gclass91_0.method_8();
         }
         catch
         {
         }
         PErkava.concurrentDictionary_2[this.method_1()] = false;
         if (!this.method_9())
         {
             Debug.WriteLine("Patching failed");
             MessageBox.Show("Could not patch the client. This could mean that PErkava doesn't yet support this client version.");
             return;
         }
         PErkava.concurrentDictionary_2[this.method_1()] = true;
         return;
     }
     else
     {
         if (this.bool_3)
         {
             this.bool_3 = false;
             int_0--;
             long position = binaryStream_0.Position;
             binaryStream_0.Position = position + 1L;
         }
         GClass84 <GClass857> gclass = this.gclass84_0;
         if (gclass == null)
         {
             return;
         }
         gclass.method_10(binaryStream_0, byte_0, int_0);
         return;
     }
 }
示例#11
0
 private void method_12(GClass91 gclass91_1)
 {
     this.bool_1 = false;
     if (!ConnectionManager.Instance.IsValueCreated)
     {
         ConnectionManager.Instance.Value = this.Connection;
     }
     if (!GameManager.Instance.IsValueCreated)
     {
         ThreadLocal <GameManager> instance   = GameManager.Instance;
         ConnectionManager         connection = this.Connection;
         instance.Value = ((connection != null) ? connection.Game : null);
     }
     GClass91.GClass92.GDelegate5 connected = this.Connected;
     if (connected == null)
     {
         return;
     }
     connected(gclass91_1);
 }
示例#12
0
    private void method_6(GClass91 gclass91_0, ErrorReason errorReason_0, Exception exception_0)
    {
        GameManager game = this.Game;
        int?        num;

        if (game == null)
        {
            num = null;
        }
        else
        {
            Settings settings = game.Settings;
            if (settings == null)
            {
                num = null;
            }
            else
            {
                FlashSettings flashSettings = settings.FlashSettings;
                num = ((flashSettings != null) ? new int?(flashSettings.userID) : null);
            }
        }
        int?num2 = num;
        IPErkavaBotController iperkavaBotController;

        if (!PErkava.smethod_0().TryGetValue(num2 ?? -1, out iperkavaBotController))
        {
            return;
        }
        this.gameManager_0.Connection.Socket.method_5().method_1(new Action <GInterface0>(GClass82.smethod_3));
        iperkavaBotController.DetachPErkava();
        this.gclass84_0.method_1(null);
        try
        {
            this.bEyMqhdnuGd.method_8();
        }
        catch
        {
        }
    }
示例#13
0
    private void method_7(object sender, RoutedEventArgs e)
    {
        GClass932 proxy = this.Proxy;

        if (proxy == null)
        {
            return;
        }
        GClass84 <GClass857> gclass = proxy.method_0();

        if (gclass == null)
        {
            return;
        }
        GClass91 socket = gclass.Socket;

        if (socket == null)
        {
            return;
        }
        socket.method_8();
    }
示例#14
0
 private void method_8(bool bool_2, ProxySettings proxySettings_0)
 {
     if (this.Socket != null && this.Socket.method_0())
     {
         this.method_14();
         this.Disconnect(ErrorReason.ConnectionOverridden, null, false);
     }
     this.Socket = null;
     try
     {
         this.Socket = new GClass91();
         this.method_13();
         this.method_9();
         this.Socket.Connect(this.Host, this.method_0(), bool_2, proxySettings_0);
     }
     catch (Exception)
     {
         GClass91 socket = this.Socket;
         if (socket != null)
         {
             socket.method_8();
         }
     }
 }
示例#15
0
    public void Disconnect(ErrorReason reason, Exception ex = null, bool fromEvent = false)
    {
        if (this.bool_1)
        {
            return;
        }
        this.bool_1 = true;
        this.method_14();
        GClass91 socket = this.Socket;

        if (socket != null)
        {
            socket.method_8();
        }
        if (!fromEvent)
        {
            GClass91.GClass92.GDelegate6 disconnected = this.Disconnected;
            if (disconnected == null)
            {
                return;
            }
            disconnected(this.Socket, reason, ex);
        }
    }
示例#16
0
 private void method_1(GClass91 gclass91_0, ErrorReason errorReason_0, Exception exception_0 = null)
 {
     this.Hero.Clear();
     this.Map.Clear();
 }
示例#17
0
 private void method_0(GClass91 gclass91_0)
 {
     this.IsLoggedOut = false;
 }
示例#18
0
 private void method_5(GClass91 gclass91_0)
 {
     this.bool_3 = true;
 }
示例#19
0
 private void method_15(GClass91 gclass91_1)
 {
 }
示例#20
0
    public bool method_2()
    {
        GClass91 socket = this.Socket;

        return(socket != null && socket.method_0());
    }