private void ShowEquipmentUpgradesMenuItem_Click(object sender, EventArgs e) { if (CharactersTreeView.SelectedNode == null) { return; } var characterEquipment = new List <ExtendedMyWorldObject>(); var muleEquipment = new List <ExtendedMyWorldObject>(); foreach (var item in boundList) { if (item.Owner == CharactersTreeView.SelectedNode.Text && item.EquippedSlot != 0) { characterEquipment.Add(item); } if (item.Owner != CharactersTreeView.SelectedNode.Text && item.EquippedSlot == 0) { muleEquipment.Add(item); } } var upgrades = characterEquipment.GetUpgradeOptions(muleEquipment); EquipmentUpgradesForm equipmentUpgradesForm = new EquipmentUpgradesForm(); equipmentUpgradesForm.Owner = this; equipmentUpgradesForm.Show(); equipmentUpgradesForm.Update(upgrades); }
private void ShowEquipmentUpgradesMenuItem_Click(object sender, EventArgs e) { if (CharactersTreeView.SelectedNode == null) return; EquipmentGroup characterEquipment = new EquipmentGroup(); EquipmentGroup muleEquipment = new EquipmentGroup(); foreach (var item in boundList) { if (item.Owner == CharactersTreeView.SelectedNode.Text && item.EquippedSlot != 0) characterEquipment.Add(item); if (item.Owner != CharactersTreeView.SelectedNode.Text && item.EquippedSlot == 0) muleEquipment.Add(item); } var upgrades = characterEquipment.GetUpgradeOptions(muleEquipment); EquipmentUpgradesForm equipmentUpgradesForm = new EquipmentUpgradesForm(); equipmentUpgradesForm.Owner = this; equipmentUpgradesForm.Show(); equipmentUpgradesForm.Update(upgrades); }