コード例 #1
0
 private void butItem_Ok_Click(object sender, EventArgs e)
 {
     // Adiciona o item
     if (cmbDrop_Item.SelectedIndex >= 0)
     {
         Lists.Structures.NPC_Drop Drop = new Lists.Structures.NPC_Drop((short)(cmbDrop_Item.SelectedIndex + 1), (short)numDrop_Amount.Value, (byte)numDrop_Chance.Value);
         Selected.Drop.Add(Drop);
         lstDrop.Items.Add(Drop_String(Drop));
         grpDrop_Add.Visible = false;
     }
 }
コード例 #2
0
 private string Drop_String(Lists.Structures.NPC_Drop Drop)
 {
     return(Globals.Numbering(Drop.Item_Num, Lists.Item.GetUpperBound(0), Lists.Item[Drop.Item_Num].Name + " [" + Drop.Amount + "x, " + Drop.Chance + "%]"));
 }