protected override void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsCat(); } CalculationOptionsCat calcOpts = Character.CalculationOptions as CalculationOptionsCat; comboBoxTargetLevel.SelectedItem = calcOpts.TargetLevel.ToString(); numericUpDownTargetArmor.Value = calcOpts.TargetArmor; comboBoxFerociousBite.SelectedItem = calcOpts.CustomCPFerociousBite.ToString(); checkBoxRip.Checked = calcOpts.CustomUseRip; checkBoxRake.Checked = calcOpts.CustomUseRake; checkBoxShred.Checked = calcOpts.CustomUseShred; comboBoxSavageRoar.SelectedItem = calcOpts.CustomCPSavageRoar.ToString(); trackBarTrinketOffset.Value = (int)(calcOpts.TrinketOffset * 2); numericUpDownDuration.Value = calcOpts.Duration; numericUpDownLagVariance.Value = calcOpts.LagVariance; labelTrinketOffset.Text = string.Format(labelTrinketOffset.Tag.ToString(), calcOpts.TrinketOffset); _loadingCalculationOptions = false; }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; // if (Character != null && Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsCat(); _loadingCalculationOptions = true; } else if (Character == null) { return; } calcOpts = Character.CalculationOptions as CalculationOptionsCat; // _loadingCalculationOptions = false; }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; // if (Character != null && Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsCat(); _loadingCalculationOptions = true; } else if (Character == null) { return; } calcOpts = Character.CalculationOptions as CalculationOptionsCat; // _loadingCalculationOptions = false; }
private void calculationOptionControl_Changed(object sender, EventArgs e) { if (!_loadingCalculationOptions) { CalculationOptionsCat calcOpts = Character.CalculationOptions as CalculationOptionsCat; calcOpts.TargetLevel = int.Parse(comboBoxTargetLevel.SelectedItem.ToString()); calcOpts.TargetArmor = (int)numericUpDownTargetArmor.Value; calcOpts.CustomCPFerociousBite = int.Parse(comboBoxFerociousBite.SelectedItem.ToString()); calcOpts.CustomUseRip = checkBoxRip.Checked; calcOpts.CustomUseRake = checkBoxRake.Checked; calcOpts.CustomUseShred = checkBoxShred.Checked; calcOpts.CustomCPSavageRoar = int.Parse(comboBoxSavageRoar.SelectedItem.ToString()); calcOpts.TrinketOffset = (float)trackBarTrinketOffset.Value / 2f; calcOpts.Duration = (int)numericUpDownDuration.Value; calcOpts.LagVariance = (int)numericUpDownLagVariance.Value; labelTrinketOffset.Text = string.Format(labelTrinketOffset.Tag.ToString(), calcOpts.TrinketOffset); Character.OnCalculationsInvalidated(); } }
public Stats GetBuffsStats(Character character, CalculationOptionsCat calcOpts) { List<Buff> removedBuffs = new List<Buff>(); List<Buff> addedBuffs = new List<Buff>(); List<Buff> buffGroup = new List<Buff>(); #region Maintenance Auto-Fixing // Removes the Sunder Armor if you are maintaining it yourself // Also removes Acid Spit and Expose Armor // We are now calculating this internally for better accuracy and to provide value to relevant talents if (calcOpts.CustomUseMangle) { buffGroup.Clear(); buffGroup.Add(Buff.GetBuffByName("Sunder Armor")); buffGroup.Add(Buff.GetBuffByName("Expose Armor")); buffGroup.Add(Buff.GetBuffByName("Faerie Fire")); buffGroup.Add(Buff.GetBuffByName("Corrosive Spit")); buffGroup.Add(Buff.GetBuffByName("Tear Armor")); MaintBuffHelper(buffGroup, character, removedBuffs); } #endregion StatsCat statsBuffs = new StatsCat(); statsBuffs.Accumulate(GetBuffsStats(character.ActiveBuffs, character.SetBonusCount)); foreach (Buff b in removedBuffs) { character.ActiveBuffsAdd(b); } foreach (Buff b in addedBuffs) { character.ActiveBuffs.Remove(b); } return statsBuffs; }