예제 #1
0
 public void SetReader(AuthClient AuthClient, GameClient clientGame, BinaryReader reader, byte[] buffer)
 {
     this.clientGame = clientGame;
     this.AuthClient = AuthClient;
     this.reader     = reader;
     this.buffer     = buffer;
     Classe_         = Classe_Raiz.INTs();
     player          = Conexão.INSTs().player;
     Carregar        = Carregar.INTs();
 }
예제 #2
0
        public void GetPacketAuth(AuthClient AuthClient, byte[] data)
        {
            try
            {
                lock (this)
                {
                    BinaryReader reader = new BinaryReader(new MemoryStream(data));
                    switch (reader.ReadUInt16())
                    {
                    case 529: read = new BASE_GIFT_LIST_REQ(); break;

                    case 545: read = new BASE_MYCASH_REQ(); break;

                    case 2049: read = new AUTH_BASE_SCHANNEL_LIST_REQ(); break;

                    case 2062: read = new BASE_LOGIN_ERROR_REQ(); break;

                    case 2564: read = new BASE_LOGIN_REQ(); break;

                    case 2566: read = new BASE_MYINFO_REQ(); break;

                    case 2578: read = new BASE_ENTER_SERVER_REQ(); break;

                    case 2655: read = new BASE_EXIT_AUTH_REQ(); break;

                    case 2694: read = new BASE_CLIENT_URL_REQ(); break;

                    case 2699: read = new BASE_INVENTORY_REQ(); break;
                    }
                    if (read != null)
                    {
                        read.SetReader(AuthClient, null, reader, data);
                        Program.Form1.label15.Text = $"{data.Length}";
                        Dados.IniciarThead(read.Run);
                        read = null;
                    }
                }
            }
            catch (Exception ex)
            {
                new _Message().Error(ex.ToString());
            }
        }
예제 #3
0
        public override void Avoid()
        {
            Login_Error result = (Login_Error)ReadD();

            ReadC();
            player.ID = ReadQ();
            string login = ReadS(ReadC());

            ReadC();
            ReadC();
            if (AuthClient != null)
            {
                switch (result)
                {
                case Login_Error.LOGIN_SUCESSO:     //CAIU?
                case Login_Error.LOGIN_SUCESSO_ACEITO:
                {
                    if (Program.Form1.classe_.BotLogin)
                    {
                        Program.Form1.label3.Text = $"Contas [{++Classe_.Contas}] sendo floodadas.";
                    }
                    AuthClient.SendPacket(new BASE_MYINFO_ACK().Write());
                    Program.Form1.WriteSender("Sucesso ao Logar!", Color.Green);
                    player.loggerUser = true;
                    break;
                }

                case Login_Error.LOGIN_BLOQUEADO_REGIÃO:
                {
                    Classe_.PadraoRegion = 1;
                    Carregar.region      = (Regions)Enum.ToObject(typeof(Regions), ++Classe_.PadraoRegion);
                    if (Classe_.PadraoRegion < 15)
                    {
                        Program.Form1.WriteSender("[RegionBlocked] Região foi alterada, tente novamente.", Color.Green);
                    }
                    else
                    {
                        Program.Form1.WriteSender("Limites de Região atingido.", Color.Red);
                    }
                    break;
                }

                case Login_Error.LOGIN_CLIENT_INCOMPATIVEL:
                {
                    if (ClientRevision() < 4)
                    {
                        Program.Form1.WriteSender("[ClientError] Client foi alterada, tente novamente.", Color.Green);
                    }
                    else
                    {
                        Program.Form1.WriteSender("Limites de Client atingido.", Color.Red);
                    }
                    break;
                }

                case Login_Error.LOGIN_ERROR_CONFIG:     //SERVER MSG ANNOUNCE
                {
                    Program.Form1.WriteSender("Sua configuração de login está errada.", Color.Green);
                    break;
                }

                default: Program.Form1.WriteSender($"Erro ao logar: {result}", Color.Red); break;
                }
            }
        }