Exemplo n.º 1
0
        private void enviar_Paquete_Movimiento()
        {
            string path_string = PathFinderUtil.get_Pathfinding_Limpio(actual_path, false, mapa);

            cuenta.conexion.enviar_Paquete("GA001" + path_string);
            cuenta.personaje.evento_Personaje_Pathfinding_Minimapa(actual_path);
        }
Exemplo n.º 2
0
        private void enviar_Paquete_Movimiento()
        {
            if (cuenta.Estado_Cuenta == EstadoCuenta.REGENERANDO)
            {
                cuenta.conexion.enviar_Paquete("eU1", true);
            }

            string path_string = PathFinderUtil.get_Pathfinding_Limpio(actual_path);

            cuenta.conexion.enviar_Paquete("GA001" + path_string, true);
            personaje.evento_Personaje_Pathfinding_Minimapa(actual_path);
        }
Exemplo n.º 3
0
        private void Send_Movimiento()
        {
            if (cuenta.AccountStatus == AccountStatus.Regenerating)
            {
                cuenta.Connection.Send("eU1", true);
            }

            string path_string = PathFinderUtil.get_Pathfinding_Limpio(actual_path);

            cuenta.Connection.Send("GA001" + path_string, true);
            personaje.evento_Personaje_Pathfinding_Minimapa(actual_path);
        }
Exemplo n.º 4
0
        private void enviar_Paquete_Movimiento()
        {
            if (cuenta.AccountState == AccountStates.REGENERATION)
            {
                cuenta.connexion.SendPacket("eU1", true);
            }

            string path_string = PathFinderUtil.get_Pathfinding_Limpio(actual_path);

            cuenta.connexion.SendPacket("GA001" + path_string, true);
            personaje.evento_Personaje_Pathfinding_Minimapa(actual_path);
        }
Exemplo n.º 5
0
        // Token: 0x06000459 RID: 1113 RVA: 0x000100C4 File Offset: 0x0000E4C4
        private void enviar_Paquete_Movimiento()
        {
            bool flag = this.cuenta.Estado_Cuenta == EstadoCuenta.REGENERANDO;

            if (flag)
            {
                this.cuenta.conexion.enviar_Paquete("eU1", true);
            }
            string str = PathFinderUtil.get_Pathfinding_Limpio(this.actual_path);

            this.cuenta.conexion.enviar_Paquete("GA001" + str, true);
            this.personaje.evento_Personaje_Pathfinding_Minimapa(this.actual_path);
        }
Exemplo n.º 6
0
    private void ConnectDoors(GameObject a, GameObject b)
    {
        var positionA = LevelSystem.Instance.ToVec2i(
            a.transform.position);

        var positionB = LevelSystem.Instance.ToVec2i(
            b.transform.position);

        PathFinderUtil.SetMap(tileMap);

        var pointA   = new PathFinderPoint(positionA.x, positionA.y);
        var pointB   = new PathFinderPoint(positionB.x, positionB.y);
        var pathData = PathFinderUtil.FindPath(pointA, pointB);

        foreach (var path in pathData.path)
        {
            SetTileValue((int)path.x, (int)path.z, HALL, null, "Path");
        }
    }
Exemplo n.º 7
0
        public async Task evento_Movimiento_Finalizado(Celda celda_destino, byte tipo_gkk, bool correcto)
        {
            if (correcto)
            {
                if (cuenta.esta_Luchando())
                {
                    await Task.Delay(400 + (100 * personaje.celda.get_Distancia(celda_destino)));
                }
                else
                {
                    await Task.Delay(PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(personaje.celda, actual_path, personaje.esta_utilizando_dragopavo));
                }

                await cuenta.conexion.enviar_Paquete_Async("GKK" + tipo_gkk);

                personaje.celda = celda_destino;
            }

            actual_path          = null;
            cuenta.Estado_Cuenta = cuenta.esta_Luchando() ? EstadoCuenta.LUCHANDO : EstadoCuenta.CONECTADO_INACTIVO;
            movimiento_finalizado?.Invoke(correcto);
        }
Exemplo n.º 8
0
        public async Task evento_Movimiento_Finalizado(Celda celda_destino, byte tipo_gkk, bool correcto)
        {
            cuenta.AccountStatus = AccountStatus.Moving;

            if (correcto)
            {
                await Task.Delay(PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(personaje.celda, actual_path, personaje.esta_utilizando_dragopavo));

                //por si en el delay el bot esta desconectado
                if (cuenta == null || cuenta.AccountStatus == AccountStatus.Disconnected)
                {
                    return;
                }

                cuenta.Connection.Send("GKK" + tipo_gkk);
                personaje.celda = celda_destino;
            }

            actual_path          = null;
            cuenta.AccountStatus = AccountStatus.ConnectedInactive;
            movimiento_finalizado?.Invoke(correcto);
        }
Exemplo n.º 9
0
        public async Task evento_Movimiento_Finalizado(Celda celda_destino, byte tipo_gkk, bool correcto)
        {
            cuenta.Estado_Cuenta = EstadoCuenta.MOVIMIENTO;

            if (correcto)
            {
                await Task.Delay(PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(personaje.celda, actual_path, personaje.esta_utilizando_dragopavo));

                //por si en el delay el bot esta desconectado
                if (cuenta == null || cuenta.Estado_Cuenta == EstadoCuenta.DESCONECTADO)
                {
                    return;
                }

                cuenta.conexion.enviar_Paquete("GKK" + tipo_gkk);
                personaje.celda = celda_destino;
            }

            actual_path          = null;
            cuenta.Estado_Cuenta = EstadoCuenta.CONECTADO_INACTIVO;
            movimiento_finalizado?.Invoke(correcto);
        }
Exemplo n.º 10
0
        // Token: 0x06000457 RID: 1111 RVA: 0x0000FFC0 File Offset: 0x0000E3C0
        public async Task get_Mover_Celda_Pelea(KeyValuePair <short, MovimientoNodo>?nodo)
        {
            bool flag = !this.cuenta.esta_luchando();

            if (!flag)
            {
                bool flag2 = nodo == null || nodo.Value.Value.camino.celdas_accesibles.Count == 0;
                if (!flag2)
                {
                    bool flag3 = nodo.Value.Key == this.cuenta.juego.pelea.jugador_luchador.celda.id;
                    if (!flag3)
                    {
                        nodo.Value.Value.camino.celdas_accesibles.Insert(0, this.cuenta.juego.pelea.jugador_luchador.celda.id);
                        List <Celda> lista_celdas = (from c in nodo.Value.Value.camino.celdas_accesibles
                                                     select this.mapa.get_Celda_Id(c)).ToList <Celda>();
                        await this.cuenta.conexion.enviar_Paquete_Async("GA001" + PathFinderUtil.get_Pathfinding_Limpio(lista_celdas), false);

                        this.personaje.evento_Personaje_Pathfinding_Minimapa(lista_celdas);
                    }
                }
            }
        }
Exemplo n.º 11
0
        public async Task evento_Movimiento_Finalizado(Cell celda_destino, byte tipo_gkk, bool correcto)
        {
            cuenta.AccountState = AccountStates.MOVING;

            if (correcto)
            {
                await Task.Delay(PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(personaje.celda, actual_path, personaje.esta_utilizando_dragopavo));

                //por si en el delay el bot esta desconectado
                if (cuenta == null || cuenta.AccountState == AccountStates.DISCONNECTED)
                {
                    return;
                }

                cuenta.connexion.SendPacket("GKK" + tipo_gkk);
                personaje.celda = celda_destino;
            }

            actual_path         = null;
            cuenta.AccountState = AccountStates.CONNECTED_INACTIVE;
            movimiento_finalizado?.Invoke(correcto);
        }
Exemplo n.º 12
0
        public async Task get_Mover_Celda_Pelea(KeyValuePair <short, MovimientoNodo>?nodo)
        {
            if (!cuenta.IsFighting())
            {
                return;
            }

            if (nodo == null || nodo.Value.Value.camino.celdas_accesibles.Count == 0)
            {
                return;
            }

            if (nodo.Value.Key == cuenta.game.fight.jugador_luchador.celda.cellId)
            {
                return;
            }

            nodo.Value.Value.camino.celdas_accesibles.Insert(0, cuenta.game.fight.jugador_luchador.celda.cellId);
            List <Cell> lista_celdas = nodo.Value.Value.camino.celdas_accesibles.Select(c => mapa.GetCellFromId(c)).ToList();
            await cuenta.connexion.SendPacketAsync("GA001" + PathFinderUtil.get_Pathfinding_Limpio(lista_celdas), false);

            personaje.evento_Personaje_Pathfinding_Minimapa(lista_celdas);
        }
Exemplo n.º 13
0
        // Token: 0x0600045A RID: 1114 RVA: 0x00010138 File Offset: 0x0000E538
        public async Task evento_Movimiento_Finalizado(Celda celda_destino, byte tipo_gkk, bool correcto)
        {
            this.cuenta.Estado_Cuenta = EstadoCuenta.MOVIMIENTO;
            if (correcto)
            {
                await Task.Delay(PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(this.personaje.celda, this.actual_path, this.personaje.esta_utilizando_dragopavo));

                if (this.cuenta == null || this.cuenta.Estado_Cuenta == EstadoCuenta.DESCONECTADO)
                {
                    return;
                }
                this.cuenta.conexion.enviar_Paquete("GKK" + tipo_gkk.ToString(), false);
                this.personaje.celda = celda_destino;
            }
            this.actual_path          = null;
            this.cuenta.Estado_Cuenta = EstadoCuenta.CONECTADO_INACTIVO;
            Action <bool> action = this.movimiento_finalizado;

            if (action != null)
            {
                action(correcto);
            }
        }
Exemplo n.º 14
0
        public async Task get_Mover_Celda_Pelea(KeyValuePair <short, MovimientoNodo>?nodo)
        {
            if (!cuenta.esta_luchando())
            {
                return;
            }

            if (nodo == null || nodo.Value.Value.camino.celdas_accesibles.Count == 0)
            {
                return;
            }

            if (nodo.Value.Key == cuenta.pelea.jugador_luchador.celda_id)
            {
                return;
            }

            nodo.Value.Value.camino.celdas_accesibles.Insert(0, cuenta.pelea.jugador_luchador.celda_id);

            await cuenta.conexion.enviar_Paquete_Async("GA001" + PathFinderUtil.get_Pathfinding_Limpio(nodo.Value.Value.camino.celdas_accesibles, true, mapa));

            cuenta.personaje.evento_Personaje_Pathfinding_Minimapa(nodo.Value.Value.camino.celdas_accesibles);
        }
Exemplo n.º 15
0
        public async Task get_Mover_Celda_Pelea(KeyValuePair <short, MovimientoNodo>?nodo)
        {
            if (!cuenta.esta_luchando())
            {
                return;
            }

            if (nodo == null || nodo.Value.Value.camino.celdas_accesibles.Count == 0)
            {
                return;
            }

            if (nodo.Value.Key == cuenta.juego.pelea.jugador_luchador.celda.id)
            {
                return;
            }

            nodo.Value.Value.camino.celdas_accesibles.Insert(0, cuenta.juego.pelea.jugador_luchador.celda.id);
            List <Celda> lista_celdas = nodo.Value.Value.camino.celdas_accesibles.Select(c => mapa.get_Celda_Id(c)).ToList();

            await cuenta.conexion.enviar_Paquete_Async("GA001" + PathFinderUtil.get_Pathfinding_Limpio(lista_celdas), false);

            personaje.evento_Personaje_Pathfinding_Minimapa(lista_celdas);
        }
Exemplo n.º 16
0
 // Token: 0x06000484 RID: 1156 RVA: 0x00012818 File Offset: 0x00010C18
 private void get_Dibujar_Pathfinding(List <Celda> lista_celdas)
 {
     Task.Run(delegate()
     {
         this.control_mapa.agregar_Animacion(this.cuenta.juego.personaje.id, lista_celdas, PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(lista_celdas.First <Celda>(), lista_celdas, false), TipoAnimaciones.PERSONAJE);
     });
 }
Exemplo n.º 17
0
 private void get_Dibujar_Pathfinding(List <Cell> lista_celdas) => Task.Run(() => control_mapa.agregar_Animacion(cuenta.game.character.id, lista_celdas, PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(lista_celdas.First(), lista_celdas), TipoAnimaciones.PERSONAJE));
Exemplo n.º 18
0
 private void get_Dibujar_Pathfinding(List <short> lista_celdas) => Task.Run(() =>
 {
     Mapa mapa = cuenta.juego.mapa;
     control_mapa.agregar_Animacion(cuenta.juego.personaje.id, lista_celdas, PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(lista_celdas.First(), lista_celdas, mapa), TipoAnimaciones.PERSONAJE);
 });
Exemplo n.º 19
0
 private void get_Dibujar_Pathfinding(List <Celda> lista_celdas) => control_mapa.agregar_Animacion(cuenta.juego.personaje.id, lista_celdas, PathFinderUtil.get_Tiempo_Desplazamiento_Mapa(lista_celdas.First(), lista_celdas), TipoAnimaciones.PERSONAJE);