private void btn_powerrunes_Click(object sender, EventArgs e) { if (!building) { var mons = loadoutList.Items.OfType <ListViewItem>().Select(lvi => lvi.Tag as Monster).Where(m => m != null); List <Rune> lrunes = new List <Rune>(); foreach (var g in mons) { foreach (var r in g.Current.Runes) { r.ManageStats.AddOrUpdate("besttestscore", g.Score, (k, v) => v < g.Score ? g.Score : v); if (!lrunes.Contains(r) && (r.Level < 12 || r.Level < build.GetFakeLevel(r))) { lrunes.Add(r); } } } using (var qq = new RuneSelect()) { qq.Runes = lrunes; qq.SortFunc = r => - (int)r.ManageStats.GetOrAdd("besttestscore", 0); qq.RuneStatKey = "besttestscore"; qq.ShowDialog(); } } }
private void btn_powerrunes_Click(object sender, EventArgs e) { if (!building) { using (var qq = new RuneSelect()) { qq.Runes = build.GetPowerupRunes(); qq.SortFunc = r => - (int)r.ManageStats.GetOrAdd("besttestscore", 0); qq.RuneStatKey = "besttestscore"; qq.ShowDialog(); } } }
void button1_Click(object sender, EventArgs e) { Build.RunesUseLocked = false; Build.RunesUseEquipped = true; Build.RunesDropHalfSetStat = Program.GoFast; Build.RunesOnlyFillEmpty = Program.FillRunes; Build.GenRunes(Program.Data); using (var ff = new RuneSelect()) { ff.ReturnedRune = runeTest; ff.Build = Build; switch (tabControl1.SelectedTab.Text) { case "Evens": ff.Runes = Program.Data.Runes.Where(r => r.Slot % 2 == 0); List <Rune> fr = new List <Rune>(); fr.AddRange(ff.Runes.Where(r => r.Slot == 2 && Build.SlotStats[1].Contains(r.Main.Type.ToForms()))); fr.AddRange(ff.Runes.Where(r => r.Slot == 4 && Build.SlotStats[3].Contains(r.Main.Type.ToForms()))); fr.AddRange(ff.Runes.Where(r => r.Slot == 6 && Build.SlotStats[5].Contains(r.Main.Type.ToForms()))); ff.Runes = fr; break; case "Odds": ff.Runes = Program.Data.Runes.Where(r => r.Slot % 2 == 1); break; case "Global": ff.Runes = Program.Data.Runes; break; default: int slot = int.Parse(tabControl1.SelectedTab.Text); ff.Runes = Program.Data.Runes.Where(r => r.Slot == slot); break; } ff.Slot = (SlotIndex)Enum.Parse(typeof(SlotIndex), tabControl1.SelectedTab.Text); ff.Runes = ff.Runes.Where(r => Build.BuildSets.Contains(r.Set)); var res = ff.ShowDialog(); if (res == DialogResult.OK) { Rune rune = ff.ReturnedRune; if (rune != null) { runeTest = rune; TestRune(rune); } } } }
private void runeDial_RuneClick(object sender, RuneClickEventArgs e) { Build.RunesUseEquipped = Program.Settings.UseEquipped; Build.RunesUseLocked = false; Build.RunesDropHalfSetStat = Program.GoFast; Build.RunesOnlyFillEmpty = Program.FillRunes; // good idea, generate right now whenever the user clicks a... whatever Build.GenRunes(Program.Data); using (RuneSelect rs = new RuneSelect()) { rs.ReturnedRune = Build.Mon.Current.Runes[e.Slot - 1]; rs.Build = Build; rs.Slot = (SlotIndex)e.Slot; rs.Runes = Build.Runes[e.Slot - 1]; rs.ShowDialog(); } }
private void button1_Click(object sender, EventArgs e) { build.GenRunes(Main.data, false, true); using (var ff = new RuneSelect()) { ff.returnedRune = runeTest; ff.build = build; switch (tabControl1.SelectedTab.Text) { case "Evens": ff.runes = Main.data.Runes.Where(r => r.Slot % 2 == 0); List<Rune> fr = new List<Rune>(); fr.AddRange(ff.runes.Where(r => r.Slot == 2 && build.slotStats[1].Contains(r.MainType.ToForms()))); fr.AddRange(ff.runes.Where(r => r.Slot == 4 && build.slotStats[3].Contains(r.MainType.ToForms()))); fr.AddRange(ff.runes.Where(r => r.Slot == 6 && build.slotStats[5].Contains(r.MainType.ToForms()))); ff.runes = fr; break; case "Odds": ff.runes = Main.data.Runes.Where(r => r.Slot % 2 == 1); break; case "Global": ff.runes = Main.data.Runes; break; default: int slot = int.Parse(tabControl1.SelectedTab.Text); ff.runes = Main.data.Runes.Where(r => r.Slot == slot); break; } ff.slot = tabControl1.SelectedTab.Text; ff.runes = ff.runes.Where(r => build.BuildSets.Contains(r.Set)); var res = ff.ShowDialog(); if (res == System.Windows.Forms.DialogResult.OK) { Rune rune = ff.returnedRune; if (rune != null) { runeTest = rune; TestRune(rune); } } } }
// if you click on a little rune private void runeControl_Click(object sender, EventArgs e) { // reset all the gammas foreach (RuneControl t in runes) { t.Gamma = 1; t.Refresh(); } RuneControl tc = ((RuneControl)sender); // darken? wut tc.Gamma = 1.4f; // redraw that tc.Refresh(); // good idea, generate right now whenever the user clicks a... whatever build.GenRunes(Main.data, false, Main.useEquipped); using (RuneSelect rs = new RuneSelect()) { rs.build = build; rs.slot = ((int)tc.Tag-1).ToString(); rs.runes = build.runes[(int)tc.Tag-1]; rs.ShowDialog(); } }