Esempio n. 1
0
    public Item getItem(ITEMS type)
    {
        switch (type)
        {
        case ITEMS.LOG:
            return(log);

        case ITEMS.STICK:
            return(stick);

        case ITEMS.STONE:
            return(stone);

        case ITEMS.FLINT:
            return(flint);

        case ITEMS.HERB:
            return(herb);

        case ITEMS.WATER:
            return(water);

        case ITEMS.BERRY:
            return(berry);

        case ITEMS.CAMP_FIRE:
            return(campFire);
        }

        return(null);
    }
Esempio n. 2
0
    public int getMaxStack(ITEMS type)
    {
        switch (type)
        {
        case ITEMS.LOG:
            return(log.getMaxStack());

        case ITEMS.STICK:
            return(stick.getMaxStack());

        case ITEMS.STONE:
            return(stone.getMaxStack());

        case ITEMS.FLINT:
            return(flint.getMaxStack());

        case ITEMS.HERB:
            return(herb.getMaxStack());

        case ITEMS.WATER:
            return(water.getMaxStack());

        case ITEMS.BERRY:
            return(berry.getMaxStack());

        case ITEMS.CAMP_FIRE:
            return(campFire.getMaxStack());
        }

        return(-1);
    }
Esempio n. 3
0
    public void AddItem(Item item)
    {
        if (item is CannedFood || item is Ammo)
        {
            item.Use();
            return;
        }

        if (m_items.Contains(item))
        {
            if (item is Consumable)
            {
                (m_items[m_items.IndexOf(item)] as Consumable).amount += (item as Consumable).amount;
            }
            else
            {
                return;
            }
        }
        else
        {
            m_items.Add(item);
        }
        ITEMS?.Invoke(m_items);
    }
    public int getMaxStack(ITEMS type)
    {
        switch (type)
        {
        case ITEMS.LOG:
            return(LOG.getMaxStack());

        case ITEMS.STICK:
            return(STICK.getMaxStack());

        case ITEMS.STONE:
            return(STONE.getMaxStack());

        case ITEMS.FLINT:
            return(FLINT.getMaxStack());

        case ITEMS.HERB:
            return(HERB.getMaxStack());

        case ITEMS.WATER:
            return(WATER.getMaxStack());

        case ITEMS.BERRY:
            return(BERRY.getMaxStack());
        }

        return(-1);
    }
Esempio n. 5
0
    // Use this for initialization
    void Start()
    {
        if (Application.isEditor)
        {
            C_Stats.ACT = 1f;
        }
        else if (Application.isMobilePlatform)
        {
            C_Stats.ACT = 1.0f;
            ChatGUI.addLine("MobilePlatform Spotted!");
        }
        Get = this;

        ChatGUI.addLine("This Is The Path for Textures!");
        ChatGUI.addLine("Put Textures folder in there, then reload everything to implement the change!");
        ChatGUI.addLine(Application.persistentDataPath);

        ItemCreator = new ITEMS();
        ITEMS.main  = ItemCreator;
        ItemCreator.ADDITEMS();
        ITEMS.main.CreateStatEnchanter(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, " Range_Enchanter", AgilityIcon);
        //ITEMS.main.CreateStatEnchanter(0,55,0,0,0,0,0,0,0,0,0,3,0, " Rang2", AgilityIcon);
        //ITEMS.main.CreateStatEnchanter(0,0,55,0,0,0,0,0,0,0,0,3,0, " Rang3r", AgilityIcon);

        Add_items = add;
        les       = GetComponent <LoadExternalAsSprite>();



        StartCoroutine(load_items());
    }
    public Item getItem(ITEMS type)
    {
        switch (type)
        {
        case ITEMS.LOG:
            return(LOG);

        case ITEMS.STICK:
            return(STICK);

        case ITEMS.STONE:
            return(STONE);

        case ITEMS.FLINT:
            return(FLINT);

        case ITEMS.HERB:
            return(HERB);

        case ITEMS.WATER:
            return(WATER);

        case ITEMS.BERRY:
            return(BERRY);
        }

        return(null);
    }
Esempio n. 7
0
        public async Task <IActionResult> registrar([FromBody] ITEMS iTEMS)
        {
            try
            {
                await _GenericRepository.Add(iTEMS);

                _UnitOfWork.Commit();


                return(Ok(new Request()
                {
                    status = true,
                    message = "El Item se registro correctamente",
                    data = iTEMS
                }));
            }
            catch (Exception ex)
            {
                return(Ok(new Request()
                {
                    status = false,
                    message = "El Item no se registro correctamente!!",
                    data = ex.Message
                }));
            }
        }
Esempio n. 8
0
        public async Task <IActionResult> modificar([FromBody] ITEMS iTEMS)
        {
            try
            {
                await _GenericRepository.Update(iTEMS);

                _UnitOfWork.Commit();

                return(Ok(new Request()
                {
                    status = true,
                    message = "Esta accion se ejecuto correctamente",
                    data = iTEMS
                }));
            }
            catch (Exception ex)
            {
                return(Ok(new Request()
                {
                    status = false,
                    message = "Se produjo un error inesperado!!",
                    data = ex.Message
                }));
            }
        }
    public int getItemCount(ITEMS type)
    {
        switch (type)
        {
        case ITEMS.LOG:
            return(LOG.getCurrentAmount());

        case ITEMS.STICK:
            return(STICK.getCurrentAmount());

        case ITEMS.STONE:
            return(STONE.getCurrentAmount());

        case ITEMS.FLINT:
            return(FLINT.getCurrentAmount());

        case ITEMS.HERB:
            return(HERB.getCurrentAmount());

        case ITEMS.WATER:
            return(WATER.getCurrentAmount());

        case ITEMS.BERRY:
            return(BERRY.getCurrentAmount());
        }

        return(-1);
    }
Esempio n. 10
0
 public void clear()
 {
     COMPARTMENTS.Clear();
     TAGS.Clear();
     CONTAINER.Clear();
     ITEMS.Clear();
 }
Esempio n. 11
0
 void Start()
 {
     text   = "Pick Up Item 'S'";
     Canvas = GameObject.FindGameObjectWithTag("Canvas");
     player = GameObject.FindGameObjectWithTag("Player");
     item   = this.GetComponent <PublicItems>().item;
 }
Esempio n. 12
0
        public static void TripleQ()
        {
            var target = TargetSelector.GetTarget(Player.AttackRange, TargetSelector.DamageType.Physical);

            if (target != null && target.IsValidTarget() && !target.IsZombie)
            {
                if (Player.Mana == 5)
                {
                    if (Champion.Q.IsReady())
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastYoumoo();
                        }
                        Champion.Q.Cast();
                    }

                    if (Champion.E.IsReady())
                    {
                        Champion.E.Cast(target);
                    }
                    if (Champion.W.IsReady())
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(target.ServerPosition);
                    }
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast();
                    }
                }
                if (Player.Mana < 5)
                {
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast();
                    }

                    if (Champion.E.IsReady())
                    {
                        Champion.E.Cast(target);
                    }
                    if (Champion.W.IsReady())
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(target.ServerPosition);
                    }
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast();
                    }
                }
            }
        }
Esempio n. 13
0
 public void UseItem(Item item)
 {
     if (m_items.Contains(item))
     {
         item.Use();
     }
     ITEMS?.Invoke(m_items);
 }
Esempio n. 14
0
        public ActionResult DeleteConfirmed(int id)
        {
            ITEMS iTEMS = db.ITEMS.Find(id);

            db.ITEMS.Remove(iTEMS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 15
0
    public override void Interact()
    {
        this.GetComponent <PublicItems>().ReCreate();
        item = this.GetComponent <PublicItems>().item;
        itemDesc.transform.FindChild("Text").GetComponent <Text> ().text = item.itemName + " x " + item.curStack;
        player.GetComponent <Equip> ().FindEmpty(item, true);

        itemDesc.active = true;
        pickUp.active   = false;
    }
Esempio n. 16
0
 public void EquipItem(int index, int number)
 {
     CheckForActiveDup(inventory.get(index).itemName);
     items[number] = inventory.get(index);
     if (curItem == null)
     {
         curItem = items[number];
         curPos  = number;
     }
 }
Esempio n. 17
0
 public ActionResult Edit([Bind(Include = "ITEM_ID,ITEM_DESRIPTION,CATEGORY_ID,isActive")] ITEMS iTEMS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(iTEMS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(iTEMS));
 }
Esempio n. 18
0
        bool CallItemActive(ITEMS methodId, params object[] args)
        {
            string methodName = methodId.ToString();

            Type       type   = typeof(ItemActive);
            MethodInfo method = type.GetMethod(methodName);
            ItemActive c      = new ItemActive();

            return((bool)method.Invoke(c, args));
        }
Esempio n. 19
0
        private Items GeneradorItems()
        {
            Items items = new Items();
            ITEMS tipo  = (ITEMS)random.Next(0, 3);

            items.SetItems(tipo);
            items.SetNombre(GetTipoNombres(tipo));
            items.SetCosto(random.Next(0, 500) + 1);
            return(items);
        }
Esempio n. 20
0
        public static void Jungle()
        {
            var mobs = MinionManager.GetMinions(Player.AttackRange + 75, MinionTypes.All, MinionTeam.Neutral,
                                                MinionOrderTypes.MaxHealth);

            if (mobs.Count == 0 || Player.Mana == 5 && MenuConfig.Passive)
            {
                return;
            }

            var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff");

            foreach (var m in mobs)
            {
                if (Player.Mana == 5)
                {
                    if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range)
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(m);
                    }
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(m);
                    }
                    else if (Champion.E.IsReady() && !hasPassive)
                    {
                        Champion.E.Cast(m);
                    }
                }
                if (Player.Mana < 5)
                {
                    if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range)
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(m);
                    }
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(m);
                    }
                    else if (Champion.E.IsReady() && !hasPassive)
                    {
                        Champion.E.Cast(m);
                    }
                }
            }
        }
Esempio n. 21
0
        public ActionResult Create([Bind(Include = "ITEM_ID,ITEM_DESRIPTION,CATEGORY_ID,isActive")] ITEMS iTEMS)
        {
            if (ModelState.IsValid)
            {
                db.ITEMS.Add(iTEMS);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(iTEMS));
        }
Esempio n. 22
0
        public static void Lane()
        {
            var minions = MinionManager.GetMinions(Player.AttackRange);

            if (minions == null || Player.Mana == 5 && MenuConfig.Passive)
            {
                return;
            }

            var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff");

            foreach (var m in minions)
            {
                if (Player.Mana == 5)
                {
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(m);
                    }
                    if (Champion.E.IsReady() && !hasPassive)
                    {
                        Champion.E.Cast(m);
                    }
                    if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range)
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(m);
                    }
                }
                if (Player.Mana < 5)
                {
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(m);
                    }
                    if (Champion.E.IsReady() && !hasPassive)
                    {
                        Champion.E.Cast(m);
                    }
                    if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range)
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(m);
                    }
                }
            }
        }
Esempio n. 23
0
    public void manageIntventory()
    {
        ITEMS thisItemDataType = node.determineItemData();

        ImprovedInventory.instance.addItem(thisItemDataType, 1);

        #region Legacy Code - Add to inventory
        myBox.addItem(thisItemDataType, 1);
        #endregion

        updateInventoryText(thisItemDataType);
    }
Esempio n. 24
0
        public static void Combo()
        {
            var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff");

            var target = TargetSelector.GetTarget(Player.AttackRange, TargetSelector.DamageType.Physical);

            if (target.IsValidTarget() && !target.IsZombie && target.Distance(Player) <= Champion.E.Range)
            {
                if (Player.Mana == 5)
                {
                    if (Champion.E.IsReady() && target.Distance(Player) <= 600)
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastYoumoo();
                        }
                        Champion.E.Cast(target);
                    }
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(target);
                    }
                    if (Champion.W.IsReady())
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(target);
                    }
                }
                if (Player.Mana < 5)
                {
                    if (Champion.Q.IsReady())
                    {
                        Champion.Q.Cast(target);
                    }
                    if (Champion.W.IsReady())
                    {
                        if (MenuConfig.UseItem)
                        {
                            ITEMS.CastHydra();
                        }
                        Champion.W.Cast(target);
                    }
                    if (Champion.E.IsReady())
                    {
                        Champion.E.Cast(target);
                    }
                }
            }
        }
Esempio n. 25
0
 public ActionResult Create(ITEMS collection)
 {
     try
     {
         db.ITEMS.Add(collection);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Esempio n. 26
0
 public void deleteCurItem()     //
 {
     items[curPos] = null;
     curItem       = null;
     for (int i = 0; i < 4 && curItem == null; i++)
     {
         if (items [i] != null)
         {
             curPos  = i;
             curItem = items [curPos];
         }
     }
 }
Esempio n. 27
0
        // GET: ITEMS/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ITEMS iTEMS = db.ITEMS.Find(id);

            if (iTEMS == null)
            {
                return(HttpNotFound());
            }
            return(View(iTEMS));
        }
Esempio n. 28
0
 public ActionResult Edit(int id, ITEMS collection)
 {
     try
     {
         // TODO: Add update logic here
         db.ITEMS.AddOrUpdate(collection);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
        private void iTEMSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form f in this.MdiChildren)
            {
                if (f.GetType() == typeof(ITEMS))
                {
                    f.Activate();
                    return;
                }
            }
            Form ITEMS = new ITEMS();

            ITEMS.MdiParent = this;
            ITEMS.Show();
        }
Esempio n. 30
0
    public void DropItem(Consumable item, int amount)
    {
        var consumable = (m_items[m_items.IndexOf(item)] as Consumable);

        consumable.amount -= amount;
        if (consumable.amount <= 0)
        {
            m_items.Remove(consumable);
        }
        else
        {
            m_items[m_items.IndexOf(consumable)] = consumable;
        }
        ITEMS?.Invoke(m_items);
    }
Esempio n. 31
0
 public void insertItem(ITEMS item)
 {
     items.Add(item);
 }