Beispiel #1
0
 private void btnThrowOne_Click(object sender, EventArgs e)
 {
     if (lvItems.SelectedItems.Count > 0)
     {
         ItemType type = lvItems.SelectedItems[0].Tag as ItemType;
         ItemHelper.ThrowItem(type.Name, 1);
     }
 }
Beispiel #2
0
 private void btnThrowN_Click(object sender, EventArgs e)
 {
     if (lvItems.SelectedItems.Count > 0)
     {
         ItemType type = lvItems.SelectedItems[0].Tag as ItemType;
         ItemHelper.ThrowItem(type.Name, (int)nudStack.Value);
     }
 }
Beispiel #3
0
        private void btnRemoveItem_Click(object sender, EventArgs e)
        {
            ItemEx item = pgItem.SelectedObject as ItemEx;

            if (item != null)
            {
                ItemHelper.RemoveItem(item.Item);
            }

            btnRemoveItem.Enabled = false;
        }
Beispiel #4
0
        public static Item GiveItem(string itemName, int stack = 0)
        {
            Item item = ItemHelper.CreateItem(itemName, stack);

            return(me.GetItem(Main.myPlayer, item));
        }
Beispiel #5
0
        public ItemEx CreateItem()
        {
            Item item = ItemHelper.CreateItem(Name);

            return(new ItemEx(item));
        }