public async Task <IActionResult> Create(SalaDto salaDto)
        {
            ViewBag.TipoSala     = Combos.retornarOpcoesSala();
            ViewBag.Equipamentos = new SelectList(_equipamentoService.ObterSemSala(), "Id", "NomeModelo");

            salaDto.Validate();
            if (salaDto.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(salaDto.Notifications, TipoNotificacao.Warning);
                return(View(salaDto));
            }

            await _salaService.CriarAsync(salaDto);

            if (_salaService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_salaService.Notifications, TipoNotificacao.Warning);
                return(View(salaDto));
            }

            TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
            {
                new Notification("CadastrarSala", "Sala cadastrada com sucesso.")
            }, TipoNotificacao.Success);
            ViewBag.Controller = "Salas";
            return(View("_Confirmacao"));
        }
        /// <summary>
        /// Carga las Cajas.
        /// </summary>
        /// <creo>Héctor Gabriel Galicia Luna</creo>
        /// <fecha_creo>19 de Enero de 2016</fecha_creo>
        /// <modifico></modifico>
        /// <fecha_modifico></fecha_modifico>
        /// <causa_modificacion></causa_modificacion>
        private void Cargar_Cajas()
        {
            DataTable Combos;
            DataRow   Fila;

            try
            {
                Cls_Cat_Cajas_Negocio Cajas = new Cls_Cat_Cajas_Negocio();

                Cajas.P_Estatus = "ACTIVO";

                Combos = Cajas.Consultar_Caja();
                Fila   = Combos.NewRow();
                Fila[Cat_Cajas.Campo_Caja_ID]     = string.Empty;
                Fila[Cat_Cajas.Campo_Numero_Caja] = DBNull.Value;
                Combos.Rows.InsertAt(Fila, 0);

                Cmb_Numero_Caja.DataSource    = Combos.Copy();
                Cmb_Numero_Caja.DisplayMember = Cat_Cajas.Campo_Numero_Caja;
                Cmb_Numero_Caja.ValueMember   = Cat_Cajas.Campo_Caja_ID;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        //GET: Salas/Create
        public IActionResult Create()
        {
            ViewBag.TipoSala     = Combos.retornarOpcoesSala();
            ViewBag.Equipamentos = new SelectList(_equipamentoService.ObterSemSala(), "Id", "NomeModelo");

            return(View());
        }
Esempio n. 4
0
    /// <summary>
    /// Called by ShapeManager immediately after spawning
    /// </summary>
    /// <param name="hits">Hits.</param>
    /// <param name="type">Type.</param>
    public override void Init(int hits, Utility.SpawnTypes type)
    {
        base.Init(hits, type);

        SetText(hits.ToString());
        _comboManager = GameObject.FindGameObjectWithTag("Combo").GetComponent <Combos> ();
    }
Esempio n. 5
0
 public Usuario_modificacion()
 {
     db = DataBase.GetInstance();
     InitializeComponent();
     Combos.cargarComboRoles(cmb_rol);
     Combos.cargarComboTipoDocumento(cmb_tipoDoc);
 }
Esempio n. 6
0
        /// <summary>
        /// Carga los Turnos.
        /// </summary>
        /// <creo>Héctor Gabriel Galicia Luna</creo>
        /// <fecha_creo>19 de Enero de 2016</fecha_creo>
        /// <modifico></modifico>
        /// <fecha_modifico></fecha_modifico>
        /// <causa_modificacion></causa_modificacion>
        private void Cargar_Turnos()
        {
            DataTable Combos;
            DataRow   Fila;

            try
            {
                // Se consultan los Turnos del Catálogo de Productos
                Cls_Cat_Turnos_Negocio Turnos = new Cls_Cat_Turnos_Negocio();

                Combos = Turnos.Consultar_Turnos();
                Fila   = Combos.NewRow();
                Fila[Cat_Turnos.Campo_Turno_ID] = string.Empty;
                Fila[Cat_Turnos.Campo_Nombre]   = "SELECCIONE";
                Combos.Rows.InsertAt(Fila, 0);

                Cmb_Turno.DataSource    = Combos.Copy();
                Cmb_Turno.DisplayMember = Cat_Turnos.Campo_Nombre;
                Cmb_Turno.ValueMember   = Cat_Turnos.Campo_Turno_ID;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 7
0
        private void fillGrid()
        {
            int rol    = Convert.ToInt32(cmbRol.SelectedValue);
            int modulo = Convert.ToInt32(cmbModulo.SelectedValue);

            hRol.Value    = rol.ToString();
            hModulo.Value = modulo.ToString();
            DataTable dt_actions = new Combos().GetActionSreens(rol, modulo);
            DataTable dt_screens = new Combos().GetScreens(rol, modulo);
            DataSet   ds         = new DataSet();

            ds.Tables.Add(dt_screens);
            ds.Tables.Add(dt_actions);
            DataRelation drel = new DataRelation("RolPantallas", dt_screens.Columns["cod_pantalla"], dt_actions.Columns["cod_pantalla"]);

            ds.Relations.Add(drel);
            UltraWebGrid1.DataSource = ds;
            UltraWebGrid1.DataBind();
            UltraWebGrid1.DisplayLayout.ViewType           = Infragistics.WebUI.UltraWebGrid.ViewType.Hierarchical;
            UltraWebGrid1.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes;
            UltraWebGrid1.Columns[0].Type            = ColumnType.CheckBox;
            UltraWebGrid1.Columns[0].EditorControlID = new CheckBox().UniqueID;
            UltraWebGrid1.Columns[1].Hidden          = true;
            UltraWebGrid1.Columns[2].Width           = 320;
        }
        public void MakeChange_DecreasePennies_1()
        {
            Combos newCombo = new Combos(51);

            newCombo.MakeChange();
            Assert.AreEqual(1, newCombo.Change[3]);
        }
        // obtiene los precios de la empresa
        public List <Combos> getPreciosLM()
        {
            List <Combos> result = new List <Combos>();
            Combos        ent;

            FbConn.Open();
            FbComm.Connection = FbConn;

            string sql = " SELECT precio_empresa_id, nombre FROM PRECIOS_EMPRESA";

            FbComm.CommandText = sql;

            FbAdapter.SelectCommand = FbComm;

            DataTable dtConsulta = new DataTable();

            FbAdapter.Fill(dtConsulta);

            foreach (DataRow fila in dtConsulta.Rows)
            {
                ent                 = new Combos();
                ent.nombre          = Convert.ToString(fila["nombre"]);
                ent.precioEmpresaId = fila["precio_empresa_id"] == DBNull.Value ? 0 : Convert.ToInt64(fila["precio_empresa_id"]);

                result.Add(ent);
            }

            FbConn.Close();

            return(result);
        }
Esempio n. 10
0
        /// <summary>
        /// Carga las Cajas.
        /// </summary>
        /// <creo>Héctor Gabriel Galicia Luna</creo>
        /// <fecha_creo>19 de Enero de 2016</fecha_creo>
        /// <modifico></modifico>
        /// <fecha_modifico></fecha_modifico>
        /// <causa_modificacion></causa_modificacion>
        private void Cargar_Cajas()
        {
            DataTable Combos;

            try
            {
                Cls_Cat_Cajas_Negocio Cajas = new Cls_Cat_Cajas_Negocio();

                Cajas.P_Estatus = "ACTIVO";

                Combos = Cajas.Consultar_Caja();
                var Aux = (from C in Combos.AsEnumerable()
                           select new
                {
                    Caja_ID = C.Field <string>("Caja_ID"),
                    Numero_Caja = C.Field <decimal>("Numero_Caja").ToString()
                }).ToList();

                Aux.Insert(0, new { Caja_ID = string.Empty, Numero_Caja = "SELECCIONE" });

                Cmb_Numero_Caja.DataSource    = Aux;
                Cmb_Numero_Caja.DisplayMember = Cat_Cajas.Campo_Numero_Caja;
                Cmb_Numero_Caja.ValueMember   = Cat_Cajas.Campo_Caja_ID;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public static bool Eliminar(int id)
        {
            bool     paso     = false;
            Contexto contexto = new Contexto();

            try
            {
                Combos combo = contexto.Combos.Find(id);

                var Anterior = contexto.Combos.Find(combo.ComboId);
                foreach (var item in Anterior.Producto)
                {
                    if (!combo.Producto.Exists(d => d.ProductosDetalleId == item.ProductosDetalleId))
                    {
                        contexto.Entry(item).State = EntityState.Deleted;
                    }
                }

                contexto.Combos.Remove(combo);

                if (contexto.SaveChanges() > 0)
                {
                    paso = true;
                }
                contexto.Dispose();
            }
            catch (Exception)
            {
                throw;
            }
            return(paso);
        }
Esempio n. 12
0
    private List <Sentence> adjustBeliefBase(Sentence newSentence)
    {
        Sentence        allSentences       = makeBBSet();
        List <Sentence> partialMeetOptions = new List <Sentence>();
        List <int>      order = new List <int>();

        for (int i = 0; i < allSentences.SubSentences.Count; i++)
        {
            order.Add(i);
        }
        List <List <int> > combos = Combos.GetAllCombos(order);

        combos.Reverse();
        foreach (List <int> combo in combos)
        {
            Sentence set = new Sentence(null);
            foreach (int index in combo)
            {
                set.SubSentences.Add(allSentences.SubSentences[index]);
                set.Joins.Add(new Operator("&&"));
            }
            set.Joins.RemoveAt(set.Joins.Count - 1);
            if (partialMeet(set, newSentence))
            {
                set.SubSentences.Add(newSentence);
                set.Joins.Add(new Operator("&&"));
                partialMeetOptions.Add(set);
            }
        }
        return(partialMeetOptions);
    }
Esempio n. 13
0
        public bool IsActive(bool wasActive)
        {
            bool hasActiveTriggers = Combos.Any(x =>
                                                (EnvironmentAPI.Input.WasButtonPressed(x.Mouse) && EnvironmentAPI.Input.IsKeyPressed(x.Keyboard) && EnvironmentAPI.Input.IsKeyPressed(x.Keyboard2)) ||
                                                (EnvironmentAPI.Input.IsButtonPressed(x.Mouse) && EnvironmentAPI.Input.WasKeyPressed(x.Keyboard) && EnvironmentAPI.Input.IsKeyPressed(x.Keyboard2)) ||
                                                (EnvironmentAPI.Input.IsButtonPressed(x.Mouse) && EnvironmentAPI.Input.IsKeyPressed(x.Keyboard) && EnvironmentAPI.Input.WasKeyPressed(x.Keyboard2))
                                                );

            if (ActivationOnStart && !wasActive && hasActiveTriggers && !IsContinious)
            {
                return(true);
            }
            if (!ActivationOnStart && wasActive && !hasActiveTriggers && !IsContinious)
            {
                return(true);
            }
            if (ActivationOnStart && hasActiveTriggers && IsContinious)
            {
                return(true);
            }
            if (!ActivationOnStart && !hasActiveTriggers && IsContinious)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 14
0
        public static List <Combos> ObtainCombos()
        {
            SqlConnection Connection = Connecting.Connect();
            List <Combos> Combo      = new List <Combos>();
            SqlCommand    Command    = new SqlCommand("selectCombos", Connection);

            Command.CommandType = System.Data.CommandType.StoredProcedure;
            SqlDataReader DataReader = Command.ExecuteReader();

            while (DataReader.Read())
            {
                Combos newCombo = new Combos();
                newCombo.IdCliente   = DataReader.GetInt32(0);
                newCombo.NombreCli   = DataReader.GetString(1);
                newCombo.ApellidoCli = DataReader.GetString(2);
                newCombo.IdProducto  = DataReader.GetInt32(3);
                newCombo.NombreP     = DataReader.GetString(4);
                newCombo.PrecioP     = DataReader.GetInt32(5);
                newCombo.CantidadP   = DataReader.GetInt32(6);

                Combo.Add(newCombo);
            }
            Connection.Close();
            return(Combo);
        }
        public static Combos Buscar(int id)
        {
            Contexto db    = new Contexto();
            Combos   combo = new Combos();

            try
            {
                combo = db.Combos.Find(id);
                if (combo == null)
                {
                    db.Dispose();
                    return(combo);
                }

                combo.Producto.Count();
            }
            catch
            {
                throw;
            }
            finally
            {
                db.Dispose();
            }
            return(combo);
        }
Esempio n. 16
0
 public Hotel_modificacion()
 {
     InitializeComponent();
     db = DataBase.GetInstance();
     Combos.cargarComboPais(cmb_pais, true);
     //  Combos.cargarComboTipoRegimen(cmb_regimenes, accesoSistema.HotelIdActual, false);
 }
Esempio n. 17
0
        public async Task <IActionResult> Create(UsuarioDto usuarioDto)
        {
            ViewBag.Perfil = Combos.retornarOpcoesPerfil();

            usuarioDto.Validate();
            if (usuarioDto.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(usuarioDto.Notifications, TipoNotificacao.Warning);
                return(View(usuarioDto));
            }

            await _usuarioService.Criar(usuarioDto);

            if (_usuarioService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_usuarioService.Notifications, TipoNotificacao.Warning);
                return(View(usuarioDto));
            }

            TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
            {
                new Notification("CadastrarUsuario", "Usuário cadastrado com sucesso.")
            }, TipoNotificacao.Success);
            ViewBag.Controller = "Usuarios";
            return(View("_Confirmacao"));
        }
Esempio n. 18
0
        public async Task <IActionResult> Edit(UsuarioDto usuarioDto)
        {
            ViewBag.Perfil = Combos.retornarOpcoesPerfil();
            ViewBag.Status = Combos.retornarOpcoesStatus();
            if (usuarioDto.Id == null)
            {
                return(NotFound());
            }

            usuarioDto.Validate();
            if (usuarioDto.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(usuarioDto.Notifications, TipoNotificacao.Warning);
                return(View(usuarioDto));
            }

            await _usuarioService.Editar(usuarioDto);

            if (_usuarioService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_usuarioService.Notifications, TipoNotificacao.Warning);
                return(View(usuarioDto));
            }

            TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
            {
                new Notification("EditarUsuario", "Usuário editado com sucesso.")
            }, TipoNotificacao.Success);
            ViewBag.Controller = "Usuarios";
            return(View("_Confirmacao"));
        }
        public static bool Modificar(Combos combo)
        {
            bool     paso = false;
            Contexto db   = new Contexto();

            try
            {
                var Anterior = db.Combos.Find(combo.ComboId);

                foreach (var item in Anterior.Producto)
                {
                    if (!combo.Producto.Exists(d => d.ProductosDetalleId == item.ProductosDetalleId))
                    {
                        db.Entry(item).State = EntityState.Deleted;
                    }
                }
                foreach (var item in combo.Producto)
                {
                    var estado = item.ProductosDetalleId > 0 ? EntityState.Modified : EntityState.Added;
                    db.Entry(item).State = estado;
                }
                db.Entry(combo).State = EntityState.Modified;
                paso = (db.SaveChanges() > 0);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                db.Dispose();
            }

            return(paso);
        }
Esempio n. 20
0
 public Habitacion_modificar()
 {
     db = DataBase.GetInstance();
     InitializeComponent();
     Combos.cargarComboHotel(cmb_hotel, false);
     Combos.cargarComboTipoHabitacion(cmb_tipo);
 }
        public async Task <IActionResult> Edit(SalaDto salaDto)
        {
            ViewBag.TipoSala     = new SelectList(Combos.retornarOpcoesSala(), "Value", "Text", salaDto.Tipo);
            ViewBag.Equipamentos = _equipamentoService.ObterPorSalaEdicao(salaDto.Id.Value);
            ViewBag.Status       = Combos.retornarOpcoesStatus();

            salaDto.Validate();
            if (salaDto.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(salaDto.Notifications, TipoNotificacao.Warning);
                return(View(salaDto));
            }

            await _salaService.EditarAsync(salaDto);

            if (_salaService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_salaService.Notifications, TipoNotificacao.Warning);
                return(View(salaDto));
            }

            TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
            {
                new Notification("EditarSala", "Sala editada com sucesso.")
            }, TipoNotificacao.Success);
            ViewBag.Controller = "Salas";
            return(View("_Confirmacao"));
        }
Esempio n. 22
0
    void Start()
    {
        movScript    = FindObjectOfType <Movimentacao>();
        combosScript = FindObjectOfType <Combos>();
        dashScript   = FindObjectOfType <dashMove>();
        jumpScript   = FindObjectOfType <PlayerJump>();
        pauseScript  = FindObjectOfType <pauseInGame>();

        //CHAMAR TRANSIÇÃO
        transicaoParaODia = FindObjectOfType <TransicaoParaODia>();
        if (SceneManager.GetActiveScene().name == "CenaFinal")
        {
            GetComponent <Animator>().SetBool("bCenaFinal", true);

            if (GetComponent <Animator>().GetInteger("countStand") == 0)
            {
                StartCoroutine(waitStand());
            }

            GetComponent <Animator>().SetBool("bStretch", true);
        }
        else
        {
            GetComponent <Animator>().SetBool("bArtesFinalizacao", false);
        }
        fadeScript = FindObjectOfType <Fade>();
    }
        public async Task <IActionResult> Create(AgendamentoDto dto)
        {
            ViewBag.Periodo  = Combos.retornarOpcoesPeriodo();
            ViewBag.TipoSala = Combos.retornarOpcoesSala();

            dto.Validate();
            if (dto.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(dto.Notifications, TipoNotificacao.Warning);
                return(View(dto));
            }

            await _agendamentoService.CriarAsync(dto);

            if (_agendamentoService.Invalid)
            {
                TempData["Notificacao"] = new BadRequestDto(_agendamentoService.Notifications, TipoNotificacao.Warning);
                return(View(dto));
            }

            TempData["Notificacao"] = new BadRequestDto(new List <Notification>()
            {
                new Notification("CadastrarAgendamento", "Agendamento cadastrado com sucesso.")
            }, TipoNotificacao.Success);
            ViewBag.Controller = "Agendamentos";
            return(View("_Confirmacao"));
        }
        // GET: Agendamentos/Create
        public IActionResult Create()
        {
            ViewBag.Periodo  = Combos.retornarOpcoesPeriodo();
            ViewBag.TipoSala = Combos.retornarOpcoesSala();

            return(View());
        }
Esempio n. 25
0
        private bool ExisteEnLaBaseDeDatos()
        {
            RepositorioBase <Combos> repositorio = new RepositorioBase <Combos>();
            Combos combos = repositorio.Buscar(Utils.ToInt(CombosIdTextBox.Text));

            return(combos != null);
        }
Esempio n. 26
0
 protected void Limpiar()
 {
     CombosIdTextBox.Text     = "0";
     NombreCombosTextBox.Text = string.Empty;
     PrecioTotalTextBox.Text  = string.Empty;
     ViewState["Combos"]      = new Combos();
     this.BindGrid();
 }
Esempio n. 27
0
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent <Rigidbody>();
        signalDash.fillAmount = 0;

        this.animator = GetComponent <Animator>();
        combosScript  = FindObjectOfType <Combos>();
    }
Esempio n. 28
0
 void Start()
 {
     scriptGuiPlay   = Camera.main.GetComponent <GUI_Play>();
     movtrans        = GameObject.Find("transportadorMax").GetComponent <MovTransportador>();
     combosScript    = GameObject.Find("Contenedor").GetComponent <Combos>();
     audioUltra      = GameObject.Find("audioUltraPrefab");
     planeUltraCombo = GameObject.Find("planoUltraCombo");
 }
Esempio n. 29
0
 public Cliente_alta()
 {
     InitializeComponent();
     db = DataBase.GetInstance();
     Cliente_alta.Cli_alta = this;
     Combos.cargarComboPais(combo_pais);
     Combos.cargarComboTipoDocumento(cmb_cli_new_tip_doc);
 }
Esempio n. 30
0
 void Start()
 {
     movScript    = FindObjectOfType <Movimentacao>();
     combosScript = FindObjectOfType <Combos>();
     dashScript   = FindObjectOfType <dashMove>();
     jumpScript   = FindObjectOfType <PlayerJump>();
     pauseScript  = FindObjectOfType <pauseInGame>();
 }
 public void addCombo(Combos combo){
     float demultiplier = 1f;
     m_nbCombos += 1;
     if (m_intervalMin > 2.0f)
     {
         demultiplier = 0f;
         m_nbCombos = 0;
         m_totalDamageMultiplier = 0.0f;
     }
     else if(m_intervalMin > 1.5f)
     {
         demultiplier = 0.3f;
     }
     else if (m_intervalMin > 0.7f)
     {
         demultiplier = 0.7f;
     }
     else if (m_intervalMin == 0.30f)
     {
         demultiplier = 1f;
     }
     m_intervalMin = 0f;
     m_totalDamageMultiplier += (combo.DamageMultiplier)*demultiplier;
 }
Esempio n. 32
0
        private static void ComboChecks()
        {
            Hero target = null;

            if (prepareComboKey.IsActive && Utils.SleepCheck("prepareCheck") && CurrentCombo != Combos.Custom)
            {
                PrepareCombo(CurrentCombo);
                Utils.Sleep(100, "prepareCheck");
            }
            else if (prepareComboKey.IsActive && Utils.SleepCheck("prepareCheck") && CurrentCombo == Combos.Custom)
            {
                PrepareCustomCombo();
                Utils.Sleep(100, "prepareCheck");
            }
            else if (comboKey.IsActive && Utils.SleepCheck("comboCheck"))
            {
                switch (CurrentCombo)
                {
                    case Combos.EMPTornadoMeteorBlast:
                        target = GetTargetMode(Combos.EMPTornadoMeteorBlast);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCombo(Combos.EMPTornadoMeteorBlast, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.MeteorTornadoSnapAlacrity:
                        target = GetTargetMode(Combos.MeteorTornadoSnapAlacrity);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCombo(Combos.MeteorTornadoSnapAlacrity, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.SunTornadoSpiritIce:
                        target = GetTargetMode(Combos.SunTornadoSpiritIce);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCombo(Combos.SunTornadoSpiritIce, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.TornadoBlast:
                        target = GetTargetMode(Combos.TornadoBlast);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCombo(Combos.TornadoBlast, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.EMPTornado:
                        target = GetTargetMode(Combos.EMPTornado);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            Orbwalking.Orbwalk(target);
                            CastCombo(Combos.EMPTornado, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.MeteorTornado:
                        target = GetTargetMode(Combos.MeteorTornado);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCombo(Combos.MeteorTornado, target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                    case Combos.Custom:
                        target = GetTargetMode(Combos.Custom);
                        if (target != null)
                        {
                            if (toggleOrb.IsActive)
                            {
                                Orbwalking.Orbwalk(target);
                            }
                            CastCustomCombo(target);
                        }
                        else
                        {
                            if (Utils.SleepCheck("moveCheck"))
                            {
                                me.Move(Game.MousePosition);
                                Utils.Sleep(100, "moveCheck");
                            }
                        }
                        break;
                }

                Utils.Sleep(50, "comboCheck");
            }

            if (comboNext.IsActive && Utils.SleepCheck("comboNextCheck"))
            {
                CurrentCombo++;
                if (CurrentCombo == (Combos)8)
                {
                    CurrentCombo = (Combos)1;
                }
                Utils.Sleep(150, "comboNextCheck");
            }

            if (comboPrev.IsActive && Utils.SleepCheck("comboPrevCheck"))
            {
                CurrentCombo--;
                if (CurrentCombo == 0)
                {
                    CurrentCombo = (Combos)7;
                }
                Utils.Sleep(150, "comboPrevCheck");
            }
        }
Esempio n. 33
0
 public Combo(Combos combo, int strength)
 {
     ComboName = combo;
     Strength = strength;
 }
Esempio n. 34
0
        private static void CastCombo(Combos combo, Hero unit)
        {
            Ability[] SequenceOne = null;
            Ability[] SequenceTwo = null;
            Ability[] SequenceThree = null;
            Ability[] SequenceFour = null;
            //Ability[] SequenceFive; Not used yet

            switch (combo)
            {
                case Combos.EMPTornadoMeteorBlast:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.EMP);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);
                    SequenceThree = GetSpellsCombination(SpellsInvoker.Chaos_Meteor);
                    SequenceFour = GetSpellsCombination(SpellsInvoker.Deafening_Blast);
                    break;
                case Combos.MeteorTornadoSnapAlacrity:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Chaos_Meteor);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);
                    SequenceThree = GetSpellsCombination(SpellsInvoker.Cold_Snap);
                    SequenceFour = GetSpellsCombination(SpellsInvoker.Alacrity);
                    break;
                case Combos.SunTornadoSpiritIce:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Sun_Strike);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);
                    SequenceThree = GetSpellsCombination(SpellsInvoker.Forge_Spirit);
                    SequenceFour = GetSpellsCombination(SpellsInvoker.Ice_Wall);
                    break;
                case Combos.TornadoBlast:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Tornado);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Deafening_Blast);
                    break;
                case Combos.EMPTornado:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.EMP);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);
                    break;
                case Combos.MeteorTornado:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Chaos_Meteor);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);
                    break;
            }

            #region LearnChecks

            if (SequenceOne != null)
            {
                foreach (var spell in SequenceOne)
                {
                    if (spell.AbilityState == AbilityState.NotLearned)
                    {
                        if (spell == Quas)
                        {
                            LearnSpellPlease(1);
                            return;
                        }
                        else if (spell == Wex)
                        {
                            LearnSpellPlease(2);
                            return;

                        }
                        else if (spell == Exort)
                        {
                            LearnSpellPlease(3);
                            return;
                        }
                    }
                }
            }

            if (SequenceTwo != null)
            {
                foreach (var spell in SequenceTwo)
                {
                    if (spell.AbilityState == AbilityState.NotLearned)
                    {
                        if (spell == Quas)
                        {
                            LearnSpellPlease(1);
                            return;
                        }
                        else if (spell == Wex)
                        {
                            LearnSpellPlease(2);
                            return;

                        }
                        else if (spell == Exort)
                        {
                            LearnSpellPlease(3);
                            return;
                        }
                    }
                }
            }

            if (SequenceThree != null)
            {
                foreach (var spell in SequenceThree)
                {
                    if (spell.AbilityState == AbilityState.NotLearned)
                    {
                        if (spell == Quas)
                        {
                            LearnSpellPlease(1);
                            return;
                        }
                        else if (spell == Wex)
                        {
                            LearnSpellPlease(2);
                            return;

                        }
                        else if (spell == Exort)
                        {
                            LearnSpellPlease(3);
                            return;
                        }
                    }
                }
            }

            if (SequenceFour != null)
            {
                foreach (var spell in SequenceFour)
                {
                    if (spell.AbilityState == AbilityState.NotLearned)
                    {
                        if (spell == Quas)
                        {
                            LearnSpellPlease(1);
                            return;
                        }
                        else if (spell == Wex)
                        {
                            LearnSpellPlease(2);
                            return;

                        }
                        else if (spell == Exort)
                        {
                            LearnSpellPlease(3);
                            return;
                        }
                    }
                }
            }

            if (Invoke.AbilityState == AbilityState.NotLearned)
            {
                LearnSpellPlease(4);
                return;
            }

            #endregion

            var InvokeWait = 150;

            if (Invoke.CanBeCasted() && Utils.SleepCheck("InvokeCast"))
            {
                if (SequenceOne != null)
                {
                    if (!HasInvokerSpell(SequenceOne) && CanUse(SequenceOne))
                    {
                        foreach (var spell in SequenceOne)
                        {
                            spell.UseAbility();
                        }

                        Invoke.UseAbility();
                        Utils.Sleep(InvokeWait, "InvokeCast");
                    }
                }

                if (SequenceTwo != null)
                {
                    if (!HasInvokerSpell(SequenceTwo) && CanUse(SequenceTwo))
                    {
                        foreach (var spell in SequenceTwo)
                        {
                            spell.UseAbility();
                        }

                        Invoke.UseAbility();
                        Utils.Sleep(InvokeWait, "InvokeCast");
                    }
                }

                if (!TornadoCombo)
                {
                    if (SequenceThree != null)
                    {
                        if (!HasInvokerSpell(SequenceThree) && CanUse(SequenceThree))
                        {
                            foreach (var spell in SequenceThree)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                            Utils.Sleep(InvokeWait, "InvokeCast");
                        }
                    }

                    if (SequenceFour != null)
                    {
                        if (!HasInvokerSpell(SequenceFour) && CanUse(SequenceFour))
                        {
                            foreach (var spell in SequenceFour)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                            Utils.Sleep(InvokeWait, "InvokeCast");
                        }
                    }
                }
            }

            if (HasInvokerSpell(GetSpellsCombination(SpellsInvoker.EMP)) && HasInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado)))
            {
                if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.EMP)).CanBeCasted())
                {
                    var TornadoHit = TornadoHitTime(unit);
                    var TornadoUp = TornadoUpTime(Quas.Level + ((HasAghanim) ? (uint)1 : 0));

                    var EMPTime = 2900;

                    if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                    {
                        TornadoEndTime = Environment.TickCount + TornadoHit + TornadoUp;
                    }
                    EMPEndTime = Environment.TickCount + EMPTime;

                    if (EMPEndTime > TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.EMP), unit);
                        if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                        {
                            CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                        }
                    }
                    else if (EMPEndTime < TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                    }
                }
            }
            else if (HasInvokerSpell(GetSpellsCombination(SpellsInvoker.Chaos_Meteor)) && HasInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado)))
            {
                if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Chaos_Meteor)).CanBeCasted())
                {
                    var TornadoHit = TornadoHitTime(unit);
                    var TornadoUp = TornadoUpTime(Quas.Level + ((HasAghanim) ? (uint)1 : 0));

                    var MeteorTime = 1300;

                    if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                    {
                        TornadoEndTime = Environment.TickCount + TornadoHit + TornadoUp;
                    }
                    MeteorEndTime = Environment.TickCount + MeteorTime;

                    if (MeteorEndTime > TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Chaos_Meteor), unit);
                        if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                        {
                            CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                        }
                    }
                    else if (MeteorEndTime < TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                    }
                }
            }
            else if (HasInvokerSpell(GetSpellsCombination(SpellsInvoker.Sun_Strike)) && HasInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado)))
            {
                if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Sun_Strike)).CanBeCasted())
                {
                    var TornadoHit = TornadoHitTime(unit);
                    var TornadoUp = TornadoUpTime(Quas.Level + ((HasAghanim) ? (uint)1 : 0));

                    var SunTime = 1700;

                    if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                    {
                        TornadoEndTime = Environment.TickCount + TornadoHit + TornadoUp;
                    }
                    SunEndTime = Environment.TickCount + SunTime;

                    if (SunEndTime > TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Sun_Strike), unit);
                        if (GetInvokerAbility(GetSpellsCombination(SpellsInvoker.Tornado)).CanBeCasted())
                        {
                            CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                        }
                    }
                    else if (SunEndTime < TornadoEndTime)
                    {
                        CastInvokerSpell(GetSpellsCombination(SpellsInvoker.Tornado), unit);
                    }
                }
            }
            else
            {
                if (HasInvokerSpell(SequenceOne) && GetInvokerAbility(SequenceOne).CanBeCasted())
                {
                    CastInvokerSpell(SequenceOne, unit);
                }

                if (HasInvokerSpell(SequenceTwo) && GetInvokerAbility(SequenceTwo).CanBeCasted())
                {
                    CastInvokerSpell(SequenceTwo, unit);
                }

                if (HasInvokerSpell(SequenceThree) && GetInvokerAbility(SequenceThree).CanBeCasted())
                {
                    CastInvokerSpell(SequenceThree, unit);
                }

                if (HasInvokerSpell(SequenceFour) && GetInvokerAbility(SequenceFour).CanBeCasted())
                {
                    CastInvokerSpell(SequenceFour, unit);
                }
            }
        }
Esempio n. 35
0
        private static void PrepareCombo(Combos combo)
        {
            Ability[] SequenceOne;
            Ability[] SequenceTwo;

            switch (combo)
            {
                case Combos.EMPTornadoMeteorBlast:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.EMP);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;

                case Combos.MeteorTornadoSnapAlacrity:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Chaos_Meteor);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;

                case Combos.SunTornadoSpiritIce:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Sun_Strike);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;

                case Combos.TornadoBlast:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Tornado);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Deafening_Blast);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;
                case Combos.EMPTornado:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.EMP);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;
                case Combos.MeteorTornado:
                    SequenceOne = GetSpellsCombination(SpellsInvoker.Chaos_Meteor);
                    SequenceTwo = GetSpellsCombination(SpellsInvoker.Tornado);

                    if (Invoke.CanBeCasted())
                    {
                        if (!HasInvokerSpell(SequenceOne))
                        {
                            foreach (var spell in SequenceOne)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                        else if (!HasInvokerSpell(SequenceTwo))
                        {
                            foreach (var spell in SequenceTwo)
                            {
                                spell.UseAbility();
                            }

                            Invoke.UseAbility();
                        }
                    }
                    break;
            }
        }
Esempio n. 36
0
 //    declaraciones para el ataque con balon
 void Start()
 {
     scriptGuiPlay = Camera.main.GetComponent<GUI_Play>();
     movtrans = GameObject.Find("transportadorMax").GetComponent<MovTransportador>();
     combosScript = GameObject.Find("Contenedor").GetComponent<Combos>();
     audioUltra = GameObject.Find("audioUltraPrefab");
     planeUltraCombo = GameObject.Find("planoUltraCombo");
 }
Esempio n. 37
0
 private static Hero GetTargetMode(Combos combo)
 {
     switch (combo)
     {
         case Combos.EMPTornadoMeteorBlast:
             return GetMyCustomTarget(1000);
         case Combos.MeteorTornadoSnapAlacrity:
             return GetMyCustomTarget(1000);
         case Combos.SunTornadoSpiritIce:
             return GetMyCustomTarget(1000);
         case Combos.TornadoBlast:
             return GetMyCustomTarget(1000);
         case Combos.EMPTornado:
             return GetMyCustomTarget(1000);
         case Combos.MeteorTornado:
             return GetMyCustomTarget(1000);
         case Combos.Custom:
             return GetMyCustomTarget(1000);
         default:
             return GetMyCustomTarget(1000);
     }
 }
Esempio n. 38
0
        private static void InvokerIngameUpdate(EventArgs args)
        {
            me = ObjectMgr.LocalHero;
            if (me == null || me.ClassID != myClassID)
            {
                return;
            }

            if (!onLoad)
            {
                CurrentCombo = Combos.EMPTornadoMeteorBlast;

                comboKeyDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 10 / 100);
                harassKeyDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 12 / 100);
                comboNextDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 14 / 100);
                comboPrevDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 16 / 100);
                orbToggleDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 18 / 100);
                fleeDrawPos = new Vector2(Drawing.Width * 90 / 100, Drawing.Height * 20 / 100);
                isOrbwalkingDrawPos = new Vector2(Drawing.Width * 87 / 100, Drawing.Height * 23 / 100);
                currentComboDrawPos = new Vector2(Drawing.Width * 87 / 100, Drawing.Height * 27 / 100);
                customComboDrawPos = new Vector2(Drawing.Width * 85 / 100, Drawing.Height * 30 / 100);

                comboKey = new HKC("combo", "Combo", 32, HKC.KeyMode.HOLD, comboKeyDrawPos, Color.LightBlue);
                prepareComboKey = new HKC("harass", "Prepare Combo", 67, HKC.KeyMode.HOLD, harassKeyDrawPos, Color.LightBlue);
                comboNext = new HKC("nextCombo", "Next Combo", 105, HKC.KeyMode.HOLD, comboNextDrawPos, Color.Pink);
                comboPrev = new HKC("prevCombo", "Previous Combo", 103, HKC.KeyMode.HOLD, comboPrevDrawPos, Color.Pink);
                toggleOrb = new HKC("orbToggle", "Toggle Orbwalking", 101, HKC.KeyMode.TOGGLE, orbToggleDrawPos, Color.Pink);
                fleeKey = new HKC("fleeing", "Flee (Follows Mouse)", 71, HKC.KeyMode.HOLD, fleeDrawPos, Color.Pink);

                CurrentCooldowns.Add(SpellsInvoker.Cold_Snap, 0);
                CurrentCooldowns.Add(SpellsInvoker.Ghost_Walk, 0);
                CurrentCooldowns.Add(SpellsInvoker.Ice_Wall, 0);
                CurrentCooldowns.Add(SpellsInvoker.EMP, 0);
                CurrentCooldowns.Add(SpellsInvoker.Tornado, 0);
                CurrentCooldowns.Add(SpellsInvoker.Alacrity, 0);
                CurrentCooldowns.Add(SpellsInvoker.Sun_Strike, 0);
                CurrentCooldowns.Add(SpellsInvoker.Forge_Spirit, 0);
                CurrentCooldowns.Add(SpellsInvoker.Chaos_Meteor, 0);
                CurrentCooldowns.Add(SpellsInvoker.Deafening_Blast, 0);

                CurrentCanUse.Add(SpellsInvoker.Cold_Snap, false);
                CurrentCanUse.Add(SpellsInvoker.Ghost_Walk, false);
                CurrentCanUse.Add(SpellsInvoker.Ice_Wall, false);
                CurrentCanUse.Add(SpellsInvoker.EMP, false);
                CurrentCanUse.Add(SpellsInvoker.Tornado, false);
                CurrentCanUse.Add(SpellsInvoker.Alacrity, false);
                CurrentCanUse.Add(SpellsInvoker.Sun_Strike, false);
                CurrentCanUse.Add(SpellsInvoker.Forge_Spirit, false);
                CurrentCanUse.Add(SpellsInvoker.Chaos_Meteor, false);
                CurrentCanUse.Add(SpellsInvoker.Deafening_Blast, false);

                Orbwalking.Load();

                Thread formThread = new Thread(delegate ()
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new UserComboForm());
                });

                formThread.SetApartmentState(ApartmentState.STA);

                formThread.Start();

                onLoad = true;
            }

            Quas = me.Spellbook.SpellQ;
            Wex = me.Spellbook.SpellW;
            Exort = me.Spellbook.SpellE;
            Invoke = me.Spellbook.SpellR;
            spellD = me.Spellbook.SpellD;
            spellF = me.Spellbook.SpellF;

            myCustomCombo = UserComboForm.CheckedList;

            HasAghanim = me.HasItem(ClassID.CDOTA_Item_UltimateScepter);

            RunDrawings = true;

            ComboChecks();

            CooldownChecks();

            TornadoComboChecks();

            MiscStuff();

            /*
            foreach (var buff in me.Modifiers)
            {
                Console.WriteLine(buff.Name);
            }
            */
        }
Esempio n. 39
0
	// Use this for initialization
	void Awake () {
        playerComboScript = GetComponentInParent<PlayerComboManager>();
        m_PlayerStamina = GetComponentInParent<PlayerStamina>();
        m_Combo = new Combos(this, m_damageMultiplier, m_staminaCost);
        anim = GetComponent<Animator>();
	}