private void __RollSkillsButton_Click(object sender, EventArgs e) { List <Skill> pool; if (__UseCodexPool.Checked) { int usedCampaigns = 0; for (int i = 0; i < 5; ++i) { if (_UsedCampaignsInCodex[i].Checked) { usedCampaigns |= (1 << i); } } // Just grab the entire thing if elites are included: if (__IncludeElites.Checked) { pool = SkillDatabase.GetSkillsByCampaign(usedCampaigns, false); } else { // Gonna need to filter out the elites here: pool = new List <Skill>(); foreach (Skill skill in SkillDatabase.GetSkillsByCampaign(usedCampaigns, false)) { if (skill.IsElite == false) { pool.Add(skill); } } } } else { pool = new List <Skill>(); foreach (Skill skill in SkillDatabase.Data) { // You can enter this IF only if elites are included OR you aren't an elite skill (which always get included) and you also aren't a PvE only skill: if ((__IncludeElites.Checked || skill.IsElite == false) && skill.Attribute != Skill.Attributes.PvE_Only) { pool.Add(skill); } } } __SkillsDisplay.Skills = Challenges.RequiredSkills(pool, (int)__SkillsToPick.Value); __SkillsDisplay.Redraw(); refreshHTML(); }