本文整理汇总了C#中Rotation.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# Rotation.Initialize方法的具体用法?C# Rotation.Initialize怎么用?C# Rotation.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rotation
的用法示例。
在下文中一共展示了Rotation.Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShotPriority
//.........这里部分代码省略.........
calculatedStats.hasteStaticTotal = stats.PhysicalHaste;
// Needed by the rotation test
calculatedStats.autoShotStaticSpeed = rangedWeaponSpeed / (1f + calculatedStats.hasteStaticTotal);
#endregion
#region Rotation Test
// Using the rotation test will get us better frequencies
//RotationTest
rotationTest = new RotationTest(character, calculatedStats, calcOpts, bossOpts);
if (calcOpts.UseRotationTest) {
// The following properties of CalculatedStats must be ready by this call:
// * priorityRotation (shot order, durations, cooldowns)
// * quickShotsEffect
// * hasteStaticTotal
// * autoShotStaticSpeed
rotationTest.RunTest();
}
#endregion
#region Dynamic Haste Calcs
/* http://elitistjerks.com/f74/t65904-hunter_dps_analyzer/p25/#post1887407
* 1) Base focus regen is 4.00.
* 2) Pathing adds an additional 1% base focus regen per point (4.12 with 3/3 and no gear).
* 3) WF/IT/HP and ISS don't modify base regen directly.
* 4) Each 1% gear haste adds 2% base focus regen.
* 5) Rapid Fire adds 40% base regen (4.00->5.60).
* 6) Hero adds 30% base regen (4.00->5.20).
* 7) Glyph of Rapid Fire adds 10% base regen (4.00->6.00).
* 8) Focused Fire adds 15% base regen (4.00->4.60).
// Now we have the haste, we can calculate steady shot cast time,
// then rebuild other various stats.
// (future enhancement: we only really need to rebuild steady shot)
calculatedStats.steadyShot.Cd = 2f / (1f + calculatedStats.hasteStaticTotal);
if (calcOpts.UseRotationTest) {
calculatedStats.priorityRotation.initializeTimings();
calculatedStats.priorityRotation.recalculateRatios();
calculatedStats.priorityRotation.calculateFrequencySums();
} else {
calculatedStats.priorityRotation.initializeTimings();
calculatedStats.priorityRotation.calculateFrequencies();
calculatedStats.priorityRotation.calculateFrequencySums();
}
//float
autoShotSpeed = rangedWeaponSpeed / (1f + calculatedStats.hasteStaticTotal);
#endregion
#region Shots Per Second
float baseAutoShotsPerSecond = autoShotSpeed > 0 ? 1f / autoShotSpeed : 0;
//float
autoShotsPerSecond = baseAutoShotsPerSecond;
//float
specialShotsPerSecond = calculatedStats.priorityRotation.specialShotsPerSecond;
//float
totalShotsPerSecond = autoShotsPerSecond + specialShotsPerSecond;
float crittingSpecialsPerSecond = calculatedStats.priorityRotation.critSpecialShotsPerSecond;
float crittingShotsPerSecond = autoShotsPerSecond + crittingSpecialsPerSecond;
//float
shotsPerSecondWithoutHawk = specialShotsPerSecond + baseAutoShotsPerSecond;
calculatedStats.BaseAttackSpeed = (float)autoShotSpeed;
calculatedStats.shotsPerSecondCritting = crittingShotsPerSecond;
#endregion
}
public float ConstrainCrit(float lvlDifMOD, float chance) { return Math.Min(1f + lvlDifMOD, Math.Max(0f, chance)); }
*/
public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations)
{
// First things first, we need to ensure that we aren't using bad data
CharacterCalculationsHunter calc = new CharacterCalculationsHunter();
if (character == null) { return calc; }
CalculationOptionsHunter calcOpts = character.CalculationOptions as CalculationOptionsHunter;
if (calcOpts == null) { return calc; }
//
calc.character = character;
calc.CalcOpts = calcOpts;
BossOptions bossOpts = character.BossOptions;
calc.BossOpts = bossOpts;
HunterTalents talents = character.HunterTalents;
Specialization hunterspec = GetSpecialization(talents);
calc.Hunter = new HunterBase(character, this.GetCharacterStats(character, additionalItem, true), talents, hunterspec, bossOpts.Level);
CombatFactors combatFactors = new CombatFactors(character, calc.Hunter.Stats, calcOpts, bossOpts);
// WhiteAttacks whiteAttacks = new WhiteAttacks(character, calc.Hunter.Stats, combatFactors, calcOpts, bossOpts);
Rotation Rot = new Rotation(combatFactors, talents);
Rot.Initialize(calc); // Sets up the shots in the rotation and provides connection with the Calc object.
calc.HunterDpsPoints = calc.CustomDPS;
if (needsDisplayCalculations)
{
calc.HunterUnBuffed = new HunterBase(character, GetCharacterStats(character, additionalItem, false), talents, hunterspec, bossOpts.Level);
}
return calc;
}