mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-12-16 10:32:58 +08:00
Implement send mail and mail list
Optimize duplicate code
This commit is contained in:
@@ -193,7 +193,7 @@ namespace GrasscutterTools.Forms
|
||||
private IEnumerable<int> SelectedMonsterIds()
|
||||
{
|
||||
foreach (string item in ListMonsters.SelectedItems)
|
||||
yield return int.Parse(item.Substring(0, item.IndexOf(':')).Trim());
|
||||
yield return ItemMap.ToId(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -378,7 +378,7 @@ namespace GrasscutterTools.Forms
|
||||
var dropData = new DropData();
|
||||
|
||||
var item = TxtItem.Text;
|
||||
dropData.ItemId = int.Parse(item.Substring(0, item.IndexOf(':')).Trim());
|
||||
dropData.ItemId = ItemMap.ToId(item);
|
||||
//if (int.TryParse(item.Substring(0, item.IndexOf(':')).Trim(), out int itemId))
|
||||
//{
|
||||
// dropData.ItemId = itemId;
|
||||
|
||||
Reference in New Issue
Block a user