示例#1
0
 public static void Buy()
 {
     for(int i=0; i < ItemsToBuy.Count; i++)
     {
         if (!ItemsToBuy[i].Bought &&
             Player.Gold > ItemsToBuy[i].Gold &&
             !Items.HasItem(ItemsToBuy[i].ID))
         {
             Items.Item Item = new Items.Item(ItemsToBuy[i].ID);
             Item.Buy();
             ItemsToBuy[i].Bought = true;
         }
     }
 }
示例#2
0
 public static void BuyFighterItems()
 {
     for (int i = 0; i < FighterItems.Count; i++)
     {
         if (!Items.HasItem(FighterItems[i].ID, Player) &&
             Player.Gold >= FighterItems[i].Gold &&
             !FighterItems[i].Bought)
         {
             Items.Item itm = new Items.Item(FighterItems[i].ID);
             itm.Buy();
             FighterItems[i].Bought = true;
         }
     }
 }
示例#3
0
        public void BuyItems()
        {
            if (Player.InFountain())
            {
                for (int i = 0; i < Shoplist.Length; i++)
                {
                    if (!lstHasItem.Contains(Shoplist[i]))
                    {
                        Items.Item Item = new Items.Item(Shoplist[i]);
                        Item.Buy();

                        InventorySlot[] slots = Player.InventoryItems;
                        for (int j = 0; j < slots.Length; j++)
                        {
                            if (slots[j].IsValidSlot()
                                && slots[j].Id != null
                                && slots[j].Id != 0
                                && Items.HasItem(Shoplist[i])
                                && !lstHasItem.Contains(Shoplist[i]))
                            {
                                lstHasItem.Add(Shoplist[i]);
                                break;
                            }
                        }

                    }
                }
            }
        }
示例#4
0
 public static void BuyRyzeItems()
 {
     for(int i=0; i < RyzeItems.Count; i++)
     {
         if (!Items.HasItem(RyzeItems[i].ID, Player) &&
             Player.Gold >= RyzeItems[i].Gold &&
             !RyzeItems[i].Bought)
         {
             Items.Item itm = new Items.Item(RyzeItems[i].ID);
             itm.Buy();
             RyzeItems[i].Bought = true;
         }
     }
 }