/// <summary> /// Updates the statistics of the entries in the same way the given character would train this plan. /// </summary> /// <param name="scratchpad">The scratchpad.</param> /// <param name="applyRemappingPoints">if set to <c>true</c> [apply remapping points].</param> /// <param name="trainSkills">When true, the character will train every skill, increasing SP, etc.</param> /// <exception cref="System.ArgumentNullException">scratchpad</exception> public void UpdateStatistics(CharacterScratchpad scratchpad, bool applyRemappingPoints, bool trainSkills) { scratchpad.ThrowIfNull(nameof(scratchpad)); CharacterScratchpad scratchpadWithoutImplants = scratchpad.Clone(); scratchpadWithoutImplants.ClearImplants(); DateTime time = DateTime.Now; // Update the statistics foreach (PlanEntry entry in Items) { // Apply the remapping if (applyRemappingPoints && entry.Remapping != null && entry.Remapping.Status == RemappingPointStatus.UpToDate) { scratchpad.Remap(entry.Remapping); scratchpadWithoutImplants.Remap(entry.Remapping); } // Update entry's statistics entry.UpdateStatistics(scratchpad, scratchpadWithoutImplants, ref time); // Update the scratchpad if (!trainSkills) { continue; } scratchpad.Train(entry.Skill, entry.Level); scratchpadWithoutImplants.Train(entry.Skill, entry.Level); } }
/// <summary> /// Updates the statistics of the entries in the same way the given character would train this plan. /// </summary> /// <param name="scratchpad">The scratchpad.</param> /// <param name="applyRemappingPoints">if set to <c>true</c> [apply remapping points].</param> /// <param name="trainSkills">When true, the character will train every skill, increasing SP, etc.</param> /// <exception cref="System.ArgumentNullException">scratchpad</exception> public void UpdateOldTrainingTimes(CharacterScratchpad scratchpad, bool applyRemappingPoints, bool trainSkills) { scratchpad.ThrowIfNull(nameof(scratchpad)); // Update the statistics foreach (PlanEntry entry in Items) { // Apply the remapping if (applyRemappingPoints && entry.Remapping != null && entry.Remapping.Status == RemappingPointStatus.UpToDate) { scratchpad.Remap(entry.Remapping); } // Update entry's statistics entry.UpdateOldTrainingTime(scratchpad); // Update the scratchpad if (trainSkills) { scratchpad.Train(entry.Skill, entry.Level); } } }