private void cmbCategory_SelectedIndexChanged(object sender, EventArgs e) { lbxItems.Items.Clear(); DSItemCategory category = cmbCategory.SelectedItem as DSItemCategory; foreach (DSItem item in category.Items) { lbxItems.Items.Add(item); } lbxItems.SelectedIndex = 0; }
public void CreateItem() { DSItemCategory category = cmbCategory.SelectedItem as DSItemCategory; DSItem item = lbxItems.SelectedItem as DSItem; int id = item.ID; if (item.UpgradeType == DSItem.Upgrade.PyroFlame || item.UpgradeType == DSItem.Upgrade.PyroFlameAscended) { id += (int)nudUpgrade.Value * 100; } else { id += (int)nudUpgrade.Value; } if (item.UpgradeType == DSItem.Upgrade.Infusable || item.UpgradeType == DSItem.Upgrade.InfusableRestricted) { DSInfusion infusion = cmbInfusion.SelectedItem as DSInfusion; id += infusion.Value; } Hook.GetItem(category.ID, id, (int)nudQuantity.Value); }